Differential Equations - Examples of Linear Differential Equation

Slide 1:

  • Definition: A linear differential equation is an equation that can be expressed in the form $\frac{d^n y}{dt^n} + p_1 \frac{d^{(n-1)} y}{dt^{(n-1)}} + \cdots + p_n y = g(t)$
  • Linear refers to the fact that the dependent variable, $y$, and its derivatives, are raised only to the power of one.
  • Examples of linear differential equations include: $\frac{dy}{dt} + 3y = t^2$, $\frac{d^2y}{dt^2} + 2\frac{dy}{dt} + y = e^t$.

Slide 2:

  • Example 1: Solve the linear differential equation $\frac{dy}{dt} + 2y = 3t^2$ given that $y(0) = 1$.
  • Solution: Step 1: Rewrite the differential equation in standard form.
    • $\frac{dy}{dt} + 2y = 3t^2$
    • Step 2: Determine the integrating factor, $\mu(t)$.
    • $\mu(t) = e^{\int 2dt} = e^{2t}$
    • Step 3: Multiply both sides of the equation by the integrating factor.
    • $e^{2t}\frac{dy}{dt} + 2e^{2t}y = 3t^2e^{2t}$
    • Step 4: Apply the product rule to the left side of the equation.
    • $\frac{d}{dt}(e^{2t}y) = 3t^2e^{2t}$
    • Step 5: Integrate both sides of the equation.
    • $e^{2t}y = \int 3t^2e^{2t} dt = \frac{1}{4}t^2e^{2t} - \frac{1}{2}\int te^{2t} dt$
    • Step 6: Apply integration by parts to the remaining integral.
    • $e^{2t}y = \frac{1}{4}t^2e^{2t} - \frac{1}{2}\left(t \cdot \frac{1}{2}e^{2t} - \frac{1}{2}\int e^{2t} dt\right)$
    • Step 7: Simplify and solve for $y$.
    • $y = \frac{1}{4}t^2 - \frac{1}{4}t + C e^{-2t}$, where $C$ is a constant determined by the initial condition, $y(0) = 1$.

Slide 3:

  • Example 2: Solve the linear differential equation $\frac{d^2y}{dt^2} + 2\frac{dy}{dt} + y = e^t$ given that $y(0) = 1$ and $y’(0) = 0$.
  • Solution: Step 1: Rewrite the differential equation in standard form.
    • $\frac{d^2y}{dt^2} + 2\frac{dy}{dt} + y = e^t$
    • Step 2: Determine the characteristic equation.
    • $r^2 + 2r + 1 = 0$
    • Step 3: Solve for the roots of the characteristic equation.
    • $(r + 1)^2 = 0$
    • $r = -1$
    • Step 4: Write the homogeneous solution using the roots of the characteristic equation.
    • $y_h(t) = C_1e^{-t} + C_2te^{-t}$
    • Step 5: Determine the particular solution.
    • $y_p(t) = Ate^t$, where $A$ is a constant.
    • Step 6: Apply the initial conditions to find the particular solution.
    • $y(0) = A \cdot 0 \cdot e^0 = 1 \Rightarrow A = 1$
    • $y’(0) = Ae^0 - A \cdot 0 \cdot e^0 = 0 \Rightarrow A = 0$
    • $y_p(t) = 0$
    • Step 7: Write the general solution by adding the homogeneous and particular solutions.
    • $y(t) = y_h(t) + y_p(t) = C_1e^{-t} + C_2te^{-t}$

Slide 4:

  • Example 3: Solve the linear differential equation $\frac{d^2y}{dt^2} + 2\frac{dy}{dt} + y = \cos(t)$.
  • Solution: The characteristic equation remains the same as in Example 2.
    • $y_h(t) = C_1e^{-t} + C_2te^{-t}$
    • To find the particular solution for the non-homogeneous term, we assume $y_p(t) = A\cos(t) + B\sin(t)$, where $A$ and $B$ are constants.
    • $y_p’(t) = -A\sin(t) + B\cos(t)$
    • $y_p’’(t) = -A\cos(t) - B\sin(t)$
    • Plugging these into the differential equation, we get: $-A\cos(t) - B\sin(t) + 2(-A\sin(t) + B\cos(t)) + (A\cos(t) + B\sin(t)) = \cos(t)$
    • Simplifying, we have: $-3B\sin(t) + 3A\cos(t) = \cos(t)$
    • Equating coefficients, we get: $3A = 0$ and $-3B = 1$
    • Therefore, $A = 0$ and $B = -\frac{1}{3}$
    • Thus, the particular solution is: $y_p(t) = -\frac{1}{3}\sin(t)$
    • The general solution is given by: $y(t) = y_h(t) + y_p(t) = C_1e^{-t} + C_2te^{-t} - \frac{1}{3}\sin(t)$

Slide 5:

  • Example 4: Solve the linear differential equation $\frac{d^2y}{dt^2} + 2\frac{dy}{dt} + y = e^{-t}\cos(t)$.
  • Solution: The characteristic equation remains the same as in Example 2.
    • $y_h(t) = C_1e^{-t} + C_2te^{-t}$
    • To find the particular solution for the non-homogeneous term, we assume $y_p(t) = (At + B)\cos(t) + (Ct + D)\sin(t)$, where $A$, $B$, $C$, and $D$ are constants.
    • Taking derivatives and plugging into the differential equation, we can solve for the coefficients $A$, $B$, $C$, and $D$.
    • Finally, the general solution is given by: $y(t) = y_h(t) + y_p(t) = C_1e^{-t} + C_2te^{-t} + (At + B)\cos(t) + (Ct + D)\sin(t)$

Slide 6:

  • Example 5: Solve the linear differential equation $\frac{d^2y}{dt^2} + 4y = \cosh(2t)$.
  • Solution: Step 1: Rewrite the differential equation in standard form.
    • $\frac{d^2y}{dt^2} + 4y = \cosh(2t)$
    • Step 2: Determine the characteristic equation.
    • $r^2 + 4 = 0$
    • Step 3: Solve for the imaginary roots of the characteristic equation.
    • $r = \pm 2i$
    • Step 4: Write the homogeneous solution using the roots of the characteristic equation.
    • $y_h(t) = C_1\cos(2t) + C_2\sin(2t)$
    • Step 5: To find the particular solution for the non-homogeneous term, we assume $y_p(t) = A\cosh(2t)$, where $A$ is a constant.
    • Taking derivatives and plugging into the differential equation, we can solve for the coefficient $A$.
    • Finally, the general solution is given by: $y(t) = y_h(t) + y_p(t) = C_1\cos(2t) + C_2\sin(2t) + A\cosh(2t)$

Slide 7:

  • Example 6: Solve the linear differential equation $\frac{d^2y}{dt^2} - 3\frac{dy}{dt} + 2y = 5e^{2t}$.
  • Solution: The characteristic equation remains the same as in Example 2.
    • $y_h(t) = C_1e^t + C_2e^{2t}$
    • To find the particular solution for the non-homogeneous term, we assume $y_p(t) = Ae^{2t}$, where $A$ is a constant.
    • Taking derivatives and plugging into the differential equation, we can solve for the coefficient $A$.
    • Finally, the general solution is given by: $y(t) = y_h(t) + y_p(t) = C_1e^t + C_2e^{2t} + Ae^{2t}$

Slide 8:

  • Example 7: Solve the linear differential equation $\frac{d^2y}{dt^2} - 3\frac{dy}{dt} + 2y = 0$.
  • Solution: The characteristic equation remains the same as in Example 2.
    • $y_h(t) = C_1e^t + C_2e^{2t}$

Slide 9:

  • Example 8: Solve the linear differential equation $\frac{d^2y}{dt^2} - 3\frac{dy}{dt} + 2y = t^2e^{2t}$.
  • Solution: The characteristic equation remains the same as in Example 2.
    • $y_h(t) = C_1e^t + C_2e^{2t}$
    • For the particular solution, we assume $y_p(t) = (At^2 + Bt + C)e^{2t}$, where $A$, $B$, and $C$ are constants.
    • Taking derivatives and plugging into the differential equation, we can solve for the coefficients $A$, $B$, and $C$.
    • Finally, the general solution is given by: $y(t) = y_h(t) + y_p(t) = C_1e^t + C_2e^{2t} + (At^2 + Bt + C)e^{2t}$

Slide 10:

  • Example 9: Solve the linear differential equation $\frac{d^2y}{dt^2} + 3\frac{dy}{dt} + 2y = te^{-t}$.
  • Solution: The characteristic equation remains the same as in Example 2.
    • $y_h(t) = C_1e^{-t} + C_2e^{-2t}$
    • For the particular solution, we assume $y_p(t) = (At + B)e^{-t}$, where $A$ and $B$ are constants.
    • Taking derivatives and plugging into the differential equation, we can solve for the coefficients $A$ and $B$.
    • Finally, the general solution is given by: $y(t) = y_h(t) + y_p(t) = C_1e^{-t} + C_2e^{-2t} + (At + B)e^{-t}$

Slide 11:

  • Example 10: Solve the linear differential equation $\frac{d^3y}{dt^3} - \frac{dy}{dt} + 2y = 0$.
  • Solution: The characteristic equation is given by $r^3 - r + 2 = 0$.
    • The roots of this equation can be found using numerical methods or synthetic division.
    • After finding the roots, the homogeneous solution can be written as $y_h(t) = C_1e^{r_1t} + C_2e^{r_2t} + C_3e^{r_3t}$.

Slide 12:

  • Example 11: Solve the linear differential equation $\frac{dy}{dt} + y = \sin(t)$.
  • Solution: Step 1: Rewrite the differential equation in standard form.
    • $\frac{dy}{dt} + y = \sin(t)$
    • Step 2: Determine the integrating factor, $\mu(t)$.
    • $\mu(t) = e^{\int 1 dt} = e^t$
    • Step 3: Multiply both sides of the equation by the integrating factor.
    • $e^t\frac{dy}{dt} + e^ty = e^t\sin(t)$
    • Step 4: Apply the product rule to the left side of the equation.
    • $\frac{d}{dt}(e^ty) = e^t\sin(t)$
    • Step 5: Integrate both sides of the equation.
    • $e^ty = \int e^t\sin(t) dt$
    • Step 6: Solve the integral using integration by parts.
    • $e^ty = e^t(\sin(t) - \cos(t)) - \int e^t(\sin(t) - \cos(t)) dt$
    • Step 7: Simplify and solve for $y$.
    • $y = \sin(t) - \cos(t) - \int \sin(t)e^t dt + \int \cos(t)e^t dt$

Slide 13:

  • Example 12: Solve the linear differential equation $\frac{d^2y}{dt^2} + 2\frac{dy}{dt} + 2y = 0$.
  • Solution: The characteristic equation is given by $r^2 + 2r + 2 = 0$, which has no real roots.
    • In this case, the homogeneous solution can be written as $y_h(t) = e^{-t}(C_1\cos(t) + C_2\sin(t))$.

Slide 14:

  • Example 13: Solve the linear differential equation $\frac{d^3y}{dt^3} - \frac{d^2y}{dt^2} - \frac{dy}{dt} + y = 0$.
  • Solution: The characteristic equation is given by $r^3 - r^2 - r + 1 = 0$, which can be factorized as $(r - 1)^2(r + 1) = 0$.
    • The roots of this equation are $r = 1$ (with multiplicity 2) and $r = -1$.
    • Therefore, the homogeneous solution can be written as $y_h(t) = (C_1 + C_2t)e^t + C_3e^{-t}$.

Slide 15:

  • Definition: A linear differential equation is said to be homogeneous if the non-homogeneous term is zero, i.e., $g(t) = 0$.
  • Homogeneous linear differential equations can be solved by finding the roots of the characteristic equation.

Slide 16:

  • Definition: A linear differential equation is said to be non-homogeneous if the non-homogeneous term is not zero, i.e., $g(t) \neq 0$.
  • Non-homogeneous linear differential equations can be solved by finding the homogeneous solution and a particular solution for the non-homogeneous term, and then adding them together to get the general solution.

Slide 17:

  • Example 14: Solve the linear differential equation $\frac{dy}{dt} + 3y = 2t$, given $y(0) = 1$.
  • Solution: Step 1: Rewrite the differential equation in standard form.
    • $\frac{dy}{dt} + 3y = 2t$
    • Step 2: Determine the integrating factor, $\mu(t)$.
    • $\mu(t) = e^{\int 3 dt} = e^{3t}$
    • Step 3: Multiply both sides of the equation by the integrating factor.
    • $e^{3t}\frac{dy}{dt} + 3e^{3t}y = 2te^{3t}$
    • Step 4: Apply the product rule to the left side of the equation.
    • $\frac{d}{dt}(e^{3t}y) = 2te^{3t}$
    • Step 5: Integrate both sides of the equation.
    • $e^{3t}y = \int 2te^{3t} dt$
    • Step 6: Solve the integral using integration by parts.
    • $e^{3t}y = \frac{2}{3}te^{3t} - \frac{2}{3}\int e^{3t} dt$
    • Step 7: Simplify and solve for $y$.
    • $y = \frac{2}{3}t - \frac{2}{9}e^{-3t} + Ce^{-3t}$, where $C$ is determined by the initial condition, $y(0) = 1$.

Slide 18:

  • Example 15: Solve the linear differential equation $\frac{d^2y}{dt^2} + 4y = \sin(2t)$.
  • Solution: The characteristic equation remains the same as in Example 2.
    • $y_h(t) = C_1\cos(2t) + C_2\sin(2t)$
    • For the particular solution, we assume $y_p(t) = A\cos(2t) + B\sin(2t