# Solving Linear Differential Equations

### Solving Linear Differential Equations:

1. Homogeneous Linear Differential Equations:

• Characteristic Equation Method:
• Assume the solution of the form $y={e}^{rx}$.
• Substitute this solution into the homogeneous equation to form a characteristic equation using derivatives.
• Solve the characteristic equation to find roots ${r}_{1},{r}_{2},\dots ,{r}_{n}$.
• The general solution is $y={C}_{1}{e}^{{r}_{1}x}+{C}_{2}{e}^{{r}_{2}x}+\cdots +{C}_{n}{e}^{{r}_{n}x}$, where ${C}_{1},{C}_{2},\dots ,{C}_{n}$are constants.
2. Non-Homogeneous Linear Differential Equations:

• Method of Undetermined Coefficients:

• For the non-homogeneous equation ${a}_{n}\left(x\right)\frac{{d}^{n}y}{d{x}^{n}}+{a}_{n-1}\left(x\right)\frac{{d}^{n-1}y}{d{x}^{n-1}}+\cdots +{a}_{1}\left(x\right)\frac{dy}{dx}+{a}_{0}\left(x\right)y=g\left(x\right)$:
• Solve the associated homogeneous equation to find the complementary function (CF).
• Guess a form for the particular solution (PS) based on $g\left(x\right)$ and its derivatives.
• Substitute the guessed form into the non-homogeneous equation, solve for undetermined coefficients, and add the CF to get the general solution.
• Variation of Parameters:

• Applicable when the non-homogeneous term $g\left(x\right)$ is expressed as a function.
• Assume the form of a particular solution ${y}_{p}\left(x\right)$ with undetermined coefficients involving the complementary function.
• Determine the variation parameters involving integrals of functions derived from the homogeneous solution.
• Combine the CF with the PS obtained through variation of parameters to form the general solution.
• Example: Solving a Linear Differential Equation by Undetermined Coefficients:

Consider the equation ${y}^{\mathrm{\prime }\mathrm{\prime }}-4y=3{x}^{2}+2{e}^{x}$.

a. Solve the Associated Homogeneous Equation:

• The associated homogeneous equation is ${y}^{\mathrm{\prime }\mathrm{\prime }}-4y=0$, leading to the CF: ${y}_{CF}={C}_{1}{e}^{2x}+{C}_{2}{e}^{-2x}$.

b. Guess a Form for the Particular Solution (PS):

• Based on $3{x}^{2}$ and $2{e}^{x}$, assume ${y}_{p}\left(x\right)=A{x}^{2}+B{e}^{x}$, where $A$ and $B$ are undetermined coefficients.

c. Substitute the Guessed Form into the Non-Homogeneous Equation:

• Find ${y}^{\mathrm{\prime }}$ and ${y}^{\mathrm{\prime }\mathrm{\prime }}$ for ${y}_{p}\left(x\right)$ and substitute into the non-homogeneous equation.
• Equate coefficients of similar terms on both sides to solve for $A$ and $B$.

d. Combine the CF with the PS to Form the General Solution:

• The general solution is $y={C}_{1}{e}^{2x}+{C}_{2}{e}^{-2x}+A{x}^{2}+B{e}^{x}$, where $A$ and $B$ are the determined coefficients.
• Example of Solving a Linear Differential Equation:

Consider the differential equation: ${y}^{\mathrm{\prime }\mathrm{\prime }}-4{y}^{\mathrm{\prime }}+4y=3{e}^{2x}$.

a. Homogeneous Solution (CF):

• The associated homogeneous equation is ${y}^{\mathrm{\prime }\mathrm{\prime }}-4{y}^{\mathrm{\prime }}+4y=0$.
• Characteristic equation: ${r}^{2}-4r+4=0$ gives a repeated root $r=2$.
• The CF is ${y}_{CF}=\left({C}_{1}+{C}_{2}x\right){e}^{2x}$.

b. Particular Solution (PS) by Method of Undetermined Coefficients:

• Assume a particular solution of the form ${y}_{PS}=A{e}^{2x}$ for the non-homogeneous equation.
• Substitute into the equation and solve for $A$: $3{e}^{2x}=3A{e}^{2x}$. Therefore, $A=1$.
• The PS is ${y}_{PS}={e}^{2x}$.

c. General Solution:

• The general solution is the sum of CF and PS: $y={y}_{CF}+{y}_{PS}=\left({C}_{1}+{C}_{2}x\right){e}^{2x}+{e}^{2x}$.