This section focuses on analytical solutions for initial-value problems, meaning problems where we know the values of y ( t ) y(t) y ( t ) and d y d t \frac{dy}{dt} d t d y at t = 0 t=0 t = 0 (or y ( x ) y(x) y ( x ) and d y d x \frac{dy}{dx} d x d y at x = 0 x=0 x = 0 ): y ( 0 ) y(0) y ( 0 ) and y ′ ( 0 ) y^{\prime}(0) y ′ ( 0 ) .
Equations with constant coefficents ¶ A common category of 2nd-order homogeneous ODEs are equations with constant coefficients, of the form:
y ′ ′ + a y ′ + b y = 0 y^{\prime\prime} + a y^{\prime} + by = 0 y ′′ + a y ′ + b y = 0 Note that these are unforced, and the right-hand side is zero.
Solutions to these equations take the form y ( x ) = e λ x y(x) = e^{\lambda x} y ( x ) = e λ x , and inserting this into the ODE gives us the characteristic equation
λ 2 + a λ + b = 0 \lambda^2 + a \lambda + b = 0 λ 2 + aλ + b = 0 which we can solve to find the solution for given coefficients a a a and b b b and initial conditions. Depending on those coefficients and the solution to the characteristic equation, our solution can fall into one of three cases:
y ( x ) = c 1 e λ 1 x + c 2 e λ 2 x y(x) = c_1 e^{\lambda_1 x} + c_2 e^{\lambda_2 x} y ( x ) = c 1 e λ 1 x + c 2 e λ 2 x y ( x ) = c 1 e λ x + c 2 x e λ x y(x) = c_1 e^{\lambda x} + c_2 x e^{\lambda x} y ( x ) = c 1 e λ x + c 2 x e λ x (Where does that second part come from, you might ask? Well, we know that y 1 y_1 y 1 is e λ x e^{\lambda x} e λ x , but the second part cannot also be e λ x e^{\lambda x} e λ x because those are linearly dependent. So, we use reduction of order to find y 2 y_2 y 2 , which is x e λ x x e^{\lambda x} x e λ x .
y ( x ) = e − a x / 2 ( c 1 sin β x + c 2 cos β x ) y(x) = e^{-ax/2} \left( c_1 \sin \beta x + c_2 \cos \beta x \right) y ( x ) = e − a x /2 ( c 1 sin β x + c 2 cos β x ) Some examples:
y ′ ′ + 3 y ′ + 2 y = 0 y^{\prime\prime} + 3 y^{\prime} + 2y = 0 y ′′ + 3 y ′ + 2 y = 0
→ λ 2 + 3 λ + 2 = 0 ( λ + 2 ) ( λ + 1 ) = 0 λ = − 2 , − 1 y ( x ) = c 1 e − x + c 2 e − 2 x \begin{align}
\rightarrow \lambda^2 + 3\lambda + 2 &= 0 \\
(\lambda + 2)(\lambda + 1) &= 0 \\
\lambda &= -2, -1 \\
y(x) &= c_1 e^{-x} + c_2 e^{-2x}
\end{align} → λ 2 + 3 λ + 2 ( λ + 2 ) ( λ + 1 ) λ y ( x ) = 0 = 0 = − 2 , − 1 = c 1 e − x + c 2 e − 2 x Then, we would use the initial conditions given for y ( 0 ) y(0) y ( 0 ) and y ′ ( 0 ) y^{\prime}(0) y ′ ( 0 ) to find c 1 c_1 c 1 and c 2 c_2 c 2 .
y ′ ′ + 6 y ′ + 9 y = 0 y^{\prime\prime} + 6 y^{\prime} + 9y = 0 y ′′ + 6 y ′ + 9 y = 0
→ λ 2 + 6 λ + 9 = 0 ( λ + 3 ) ( λ + 3 ) = 0 λ = − 3 y ( x ) = c 1 e − 3 x + c 2 x e − 3 x \begin{align}
\rightarrow \lambda^2 + 6\lambda + 9 &= 0 \\
(\lambda + 3)(\lambda + 3) &= 0 \\
\lambda &= -3 \\
y(x) &= c_1 e^{-3x} + c_2 x e^{-3x}
\end{align} → λ 2 + 6 λ + 9 ( λ + 3 ) ( λ + 3 ) λ y ( x ) = 0 = 0 = − 3 = c 1 e − 3 x + c 2 x e − 3 x y ′ ′ + 6 y ′ + 25 y = 0 y^{\prime\prime} + 6 y^{\prime} + 25 y = 0 y ′′ + 6 y ′ + 25 y = 0
→ λ 2 + 6 λ + 25 = 0 λ = − 3 ± 4 i y ( x ) = e − 3 x ( c 1 sin 4 x + c 2 cos 4 x ) \begin{align}
\rightarrow \lambda^2 + 6\lambda + 25 &= 0 \\
\lambda &= -3 \pm 4i \\
y(x) &= e^{-3x} \left( c_1 \sin 4x + c_2 \cos 4x \right)
\end{align} → λ 2 + 6 λ + 25 λ y ( x ) = 0 = − 3 ± 4 i = e − 3 x ( c 1 sin 4 x + c 2 cos 4 x ) Euler-Cauchy equations ¶ Euler-Cauchy equations are of the form
x 2 y ′ ′ + a x y ′ + b y = 0 x^2 y^{\prime\prime} + axy^{\prime} + by = 0 x 2 y ′′ + a x y ′ + b y = 0 Solutions take the form y = x m y = x^m y = x m , which when plugged into the ODE leads to a different characterisic equation to find m m m :
y = x m y ′ = m x m − 1 y ′ ′ = m ( m − 1 ) x m − 2 → x 2 m ( m − 1 ) x m − 2 + a x m x m − 1 + b x m = 0 m 2 + ( a − 1 ) m + b = 0 \begin{align}
y &= x^m \\
y^{\prime} &= m x^{m-1} \\
y^{\prime\prime} &= m (m-1) x^{m-2} \\
\rightarrow x^2 m (m-1) x^{m-2} + axmx^{m-1} + bx^m &= 0 \\
m^2 + (a-1)m + b &= 0
\end{align} y y ′ y ′′ → x 2 m ( m − 1 ) x m − 2 + a x m x m − 1 + b x m m 2 + ( a − 1 ) m + b = x m = m x m − 1 = m ( m − 1 ) x m − 2 = 0 = 0 This is our new characteristic formula for these problems, and solving for the roots of this equation gives us m m m and thus our general solution.
Like equations with constant coefficients, we have three solution forms depending on the roots of the characteristic equation:
Real roots: y ( x ) = c 1 x m 1 + c 2 x m 2 y(x) = c_1 x^{m_1} + c_2 x^{m_2} y ( x ) = c 1 x m 1 + c 2 x m 2
Repeated roots: y ( x ) = c 1 x m + c 2 x m ln x y(x) = c_1 x^m + c_2 x^m \ln x y ( x ) = c 1 x m + c 2 x m ln x
Imaginary roots: m = α ± β i m = \alpha \pm \beta i m = α ± β i , and y ( x ) = x α [ c 1 cos ( β ln x ) + c 2 sin ( β ln x ) ] y(x) = x^{\alpha} \left[c_1 \cos (\beta \ln x) + c_2 \sin (\beta \ln x)\right] y ( x ) = x α [ c 1 cos ( β ln x ) + c 2 sin ( β ln x ) ]
Inhomogeneous 2nd-order ODEs ¶ Inhomogeneous, or forced, 2nd-order ODEs with constant coefficients take the form
y ′ ′ + a y ′ + b y = F ( t ) y^{\prime\prime} + a y^{\prime} + by = F(t) y ′′ + a y ′ + b y = F ( t ) with initial conditions y ( 0 ) = y 0 y(0) = y_0 y ( 0 ) = y 0 and y ′ ( 0 ) = y 0 ′ y^{\prime}(0) = y_0^{\prime} y ′ ( 0 ) = y 0 ′ . Depending on the form of the forcing function F ( t ) F(t) F ( t ) , we can solve with techniques such as
The solution in general to inhomogeneous ODEs includes two parts:
y ( t ) = y H + y IH = c 1 y 1 + c 2 y 2 + y IH , y(t) = y_{\text{H}} + y_{\text{IH}} = c_1 y_1 + c_2 y_2 + y_{\text{IH}} \;, y ( t ) = y H + y IH = c 1 y 1 + c 2 y 2 + y IH , where y H y_{\text{H}} y H is the solution from the equivalent homogeneous ODE y ′ ′ + a y ′ + b y = 0 y^{\prime\prime} + a y^{\prime} + b y = 0 y ′′ + a y ′ + b y = 0 .
The forcing function F ( t ) F(t) F ( t ) may be
continuous
periodic
aperiodic/discontinuous
Continuous F ( t ) F(t) F ( t ) : method of undetermined coefficients ¶ For continuous forcing functions, we have two solution methods: the method of undetermined coefficients, and variation of parameters.
Generally you’ll want to use the method of undetermined coefficients when possible, which depends on if F ( t ) F(t) F ( t ) matches one of a set of functions. In that case, the form of the inhomogeneous solution y IH ( t ) y_{\text{IH}}(t) y IH ( t ) follows that of the forcing function F ( t ) F(t) F ( t ) , with one or more unknown constants:
F ( t ) F(t) F ( t ) y IH ( t ) y_{\text{IH}}(t) y IH ( t ) constant K K K cos ω t \cos \omega t cos ω t K 1 cos ω t + K 2 sin ω t K_1 \cos \omega t + K_2 \sin \omega t K 1 cos ω t + K 2 sin ω t sin ω t \sin \omega t sin ω t K 1 cos ω t + K 2 sin ω t K_1 \cos \omega t + K_2 \sin \omega t K 1 cos ω t + K 2 sin ω t e − a t e^{-at} e − a t K e − a t K e^{-at} K e − a t ( A ) t (A) t ( A ) t K 0 + K 1 t K_0 + K_1 t K 0 + K 1 t t n t^n t n K 0 + K 1 t + K 2 t 2 + … + K n t n K_0 + K_1 t + K_2 t^2 + \ldots + K_n t^n K 0 + K 1 t + K 2 t 2 + … + K n t n
For combinations of these functions, we can combine functions; for example, given
F ( t ) = e − a t cos ω t or e − a t sin ω t y IH = K 1 e − a t cos ω t + K 2 e − a t sin ω t \begin{align}
F(t) &= e^{-at} \cos \omega t \quad \text{or} e^{-at} \sin \omega t \\
y_{\text{IH}} &= K_1 e^{-at} \cos \omega t + K_2 e^{-at} \sin \omega t
\end{align} F ( t ) y IH = e − a t cos ω t or e − a t sin ω t = K 1 e − a t cos ω t + K 2 e − a t sin ω t (Note how in all the above cases how the inhomogeneous solution follows the functional form of the forcing function; for example, the exponential decay rate a a a or the sinusoidal frequency ω \omega ω match.
The method of undetermined coefficients works by plugging the candidate inhomogeneous solutionn y IH y_{\text{IH}} y IH into the full ODE, and solving for the constants (e.g., K K K )—but not from the initial conditions.
For example, let’s solve
y ′ ′ + 2 y ′ + y = e − x y^{\prime\prime} + 2y^{\prime} + y = e^{-x} y ′′ + 2 y ′ + y = e − x with initial conditions y ( 0 ) = y ′ ( 0 ) = 0 y(0) = y^{\prime}(0) = 0 y ( 0 ) = y ′ ( 0 ) = 0 . First, we should find the solution to the homogeneous equation
y ′ ′ + 2 y ′ + y = 0 . y^{\prime\prime} + 2y^{\prime} + y = 0 \;. y ′′ + 2 y ′ + y = 0 . We can do this by using the associated characteristic formula
λ 2 + 2 λ + 1 = 0 ( λ + 1 ) ( λ + 1 ) = 0 → y H = c 1 e − x + c 2 x e − x \begin{align}
\lambda^2 + 2 \lambda + 1 &= 0 \\
(\lambda + 1)(\lambda + 1) &= 0 \\
\rightarrow y_{\text{H}} &= c_1 e^{-x} + c_2 x e^{-x}
\end{align} λ 2 + 2 λ + 1 ( λ + 1 ) ( λ + 1 ) → y H = 0 = 0 = c 1 e − x + c 2 x e − x To find the inhomogeneous solution, we would look at the table above to find what matches the forcing function e − x e^{-x} e − x . Normally, we’d grab K e − x K e^{-x} K e − x , but that would not be linearly independent from the first part of the homogeneous solution y H y_{\text{H}} y H . The same is true for K x e − x K x e^{-x} K x e − x , which is linearly dependent with the second part of y H y_{\text{H}} y H , but K x 2 e − x K x^2 e^{-x} K x 2 e − x works! Then, we just need to find K K K by plugging this into the ODE:
y IH = K x 2 e − x y ′ = K e − x ( 2 x − x 2 ) y ′ ′ = K e − x ( x 2 − 4 x + 2 ) 2 K = 1 → K = 1 2 y IH = 1 2 x 2 e − x \begin{align}
y_{\text{IH}} &= K x^2 e^{-x} \\
y^{\prime} &= K e^{-x} (2x - x^2) \\
y^{\prime\prime} &= K e^{-x} (x^2 - 4x + 2) \\
2 K &= 1 \\
\rightarrow K &= \frac{1}{2} \\
y_{\text{IH}} &= \frac{1}{2} x^2 e^{-x}
\end{align} y IH y ′ y ′′ 2 K → K y IH = K x 2 e − x = K e − x ( 2 x − x 2 ) = K e − x ( x 2 − 4 x + 2 ) = 1 = 2 1 = 2 1 x 2 e − x Thus, the overall general solution is
y ( x ) = c 1 e − x + c 2 x e − x + 1 2 x 2 e − x y(x) = c_1 e^{-x} + c_2 x e^{-x} + \frac{1}{2} x^2 e^{-x} y ( x ) = c 1 e − x + c 2 x e − x + 2 1 x 2 e − x and we would solve for the integration constants c 1 c_1 c 1 and c 2 c_2 c 2 using the initial conditions.
Important points to remember:
The constants of the inhomogeneous solution y IH y_{\text{IH}} y IH come from the ODE, not the initial conditions.
Only solve for the integration constants c 1 c_1 c 1 and c 2 c_2 c 2 (part of the homogeneous solution) once you have the full general solution y = c 1 y 1 + c 2 y 2 + y IH y = c_1 y_1 + c_2 y_2 + y_{\text{IH}} y = c 1 y 1 + c 2 y 2 + y IH .
Continuous F ( t ) F(t) F ( t ) : variation of parameters ¶ We have the variation of parameters approach to solve for inhomogeneous 2nd-order ODEs that are more general:
y ′ ′ + p ( x ) y ′ + q ( x ) y = r ( x ) y^{\prime\prime} + p(x) y^{\prime} + q(x) y = r(x) y ′′ + p ( x ) y ′ + q ( x ) y = r ( x ) In this case, we can assume a solution y ( x ) = y 1 u 1 + y 2 u 2 y(x) = y_1 u_1 + y_2 u_2 y ( x ) = y 1 u 1 + y 2 u 2 .
The solution procedure is:
Obtain y 1 y_1 y 1 and y 2 y_2 y 2 by solving the homogeneous equation: y ′ ′ + p ( x ) y ′ + q ( x ) y = 0 y^{\prime\prime} + p(x) y^{\prime} + q(x) y = 0 y ′′ + p ( x ) y ′ + q ( x ) y = 0
Solve for u 1 u_1 u 1 and u 2 u_2 u 2 :
u 1 = − ∫ y 2 r ( x ) W d x + c 1 u 2 = ∫ y 1 r ( x ) W d x + c 2 W = ∣ y 1 y 2 y 1 ′ y 2 ′ ∣ = y 1 y 2 ′ − y 2 y 1 ′ , \begin{align}
u_1 &= - \int \frac{y_2 r(x)}{W} dx + c_1 \\
u_2 &= \int \frac{y_1 r(x)}{W} dx + c_2 \\
W &= \begin{vmatrix}
y_1 & y_2\\ y_1^{\prime} & y_2^{\prime}\\
\end{vmatrix} = y_1 y_2^{\prime} - y_2 y_1^{\prime} \;,
\end{align} u 1 u 2 W = − ∫ W y 2 r ( x ) d x + c 1 = ∫ W y 1 r ( x ) d x + c 2 = ∣ ∣ y 1 y 1 ′ y 2 y 2 ′ ∣ ∣ = y 1 y 2 ′ − y 2 y 1 ′ , where W W W is the Wronksian.
Then, we have the general solution:
y = u 1 y 1 + u 2 y 2 = ( − ∫ y 2 r ( x ) W d x + c 1 ) y 1 + ( ∫ y 1 r ( x ) W d x + c 2 ) y 2 , \begin{align}
y &= u_1 y_1 + u_2 y_2 \\
&= \left( -\int \frac{y_2 r(x)}{W} dx + c_1 \right) y_1 + \left( \int \frac{y_1 r(x)}{W} dx + c_2 \right) y_2 \;,
\end{align} y = u 1 y 1 + u 2 y 2 = ( − ∫ W y 2 r ( x ) d x + c 1 ) y 1 + ( ∫ W y 1 r ( x ) d x + c 2 ) y 2 , where we solve for c 1 c_1 c 1 and c 2 c_2 c 2 using the two initial conditions.
Example 1: variation of parameters ¶ First, let’s try the same example we used for the method of undetermined coefficients above:
y ′ ′ + 2 y ′ + y = e − x y^{\prime\prime} + 2 y^{\prime} + y = e^{-x} y ′′ + 2 y ′ + y = e − x We already found the homogeneous solution, so we know that y 1 = e − x y_1 = e^{-x} y 1 = e − x and y 2 = x e − x y_2 = x e^{-x} y 2 = x e − x .
Next, let’s get the Wronksian, and then u 1 u_1 u 1 and u 2 u_2 u 2 .
W = ∣ y 1 y 2 y 1 ′ y 2 ′ ∣ = e − x e − x ( 1 − x ) − x e − x ( − e − x ) = e − 2 x u 1 = − ∫ x e − x e − x e − 2 x d x + c 1 = − ∫ x d x + c 1 = − 1 2 x 2 + c 1 u 2 = ∫ e − x e − x e − 2 x d x + c 2 = ∫ d x + c 2 = x + c 2 y ( x ) = ( − 1 2 x 2 + c 1 ) e − x + ( x + c 2 ) x e − x \begin{align}
W &= \begin{vmatrix} y_1 & y_2 \\ y_1^{\prime} & y_2^{\prime} \end{vmatrix} = e^{-x} e^{-x}(1-x) - x e^{-x} (-e^{-x}) = e^{-2x} \\
%
u_1 &= -\int \frac{x e^{-x} e^{-x}}{e^{-2x}} dx + c_1 = -\int x dx + c_1 = -\frac{1}{2} x^2 + c_1 \\
u_2 &= \int \frac{e^{-x} e^{-x}}{e^{-2x}} dx + c_2 = \int dx + c_2 = x + c_2 \\
y(x) &= \left(-\frac{1}{2} x^2 + c_1\right) e^{-x} + (x + c_2) x e^{-x} \\
\end{align} W u 1 u 2 y ( x ) = ∣ ∣ y 1 y 1 ′ y 2 y 2 ′ ∣ ∣ = e − x e − x ( 1 − x ) − x e − x ( − e − x ) = e − 2 x = − ∫ e − 2 x x e − x e − x d x + c 1 = − ∫ x d x + c 1 = − 2 1 x 2 + c 1 = ∫ e − 2 x e − x e − x d x + c 2 = ∫ d x + c 2 = x + c 2 = ( − 2 1 x 2 + c 1 ) e − x + ( x + c 2 ) x e − x After simplifying, we obtain the same solution as via the method of undetermined coefficients (but with a bit more work):
y ( x ) = x 1 e − x + c 2 x e − x + 1 2 x 2 e − x y(x) = x_1 e^{-x} + c_2 x e^{-x} + \frac{1}{2} x^2 e^{-x} y ( x ) = x 1 e − x + c 2 x e − x + 2 1 x 2 e − x Example 2: variation of parameters ¶ Now let’s try an example that we could not solve using the method of undetermined coefficients, with a forcing term that involves hyperbolic cosine (cosh); recall that cosh ( x ) = e x + e − x 2 \cosh(x) = \frac{e^x + e^{-x}}{2} cosh ( x ) = 2 e x + e − x .
y ′ ′ + 4 y ′ + 4 y = cosh ( x ) y^{\prime\prime} + 4 y^{\prime} + 4y = \cosh(x) y ′′ + 4 y ′ + 4 y = cosh ( x ) First, we need to find the homogeneous solution:
y ′ ′ + 4 y ′ + 4 y = 0 λ 2 + 4 λ + 4 = 0 → λ = − 2 \begin{align}
y^{\prime\prime} + 4 y^{\prime} + 4y &= 0 \\
\lambda^2 + 4 \lambda + 4 &= 0 \\
\rightarrow \lambda &= -2
\end{align} y ′′ + 4 y ′ + 4 y λ 2 + 4 λ + 4 → λ = 0 = 0 = − 2 So our homogeneous solution involves repeated roots:
y H = c 1 e − 2 x + c 2 x e − 2 x y_H = c_1 e^{-2x} + c_2 x e^{-2x} y H = c 1 e − 2 x + c 2 x e − 2 x where y 1 = e − 2 x y_1 = e^{-2x} y 1 = e − 2 x and y 2 = x e − 2 x y_2 = x e^{-2x} y 2 = x e − 2 x .
Then, we need to find u 1 u_1 u 1 and u 2 u_2 u 2 , so let’s get the Wronksian and then solve
W = ∣ y 1 y 2 y 1 ′ y 2 ′ ∣ = e − 2 x ( e − 2 x ) ( 1 − 2 x ) − x e − 2 x ( − 2 e − 2 x ) = e − 4 x u 1 = − ∫ x e − 2 x cosh x e − 4 x d x + c 1 = − ∫ x 1 2 ( e x + e − x ) e − 2 x d x + c 1 = − 1 2 ∫ x ( e 3 x + e x ) d x + c 1 = − 1 2 [ 1 9 e 3 x ( 3 x − 1 ) + e x ( x − 1 ) ] + c 1 u 1 = − 1 18 e 3 x ( 3 x − 1 ) − 1 2 e x ( x − 1 ) + c 1 u 2 = ∫ e − 2 x cosh x e − 4 x d x + c 2 = 1 2 ∫ e 2 x ( e x + e − x ) d x + c 2 = 1 2 ∫ ( e 3 x + e x ) d x + c 2 u 2 = 1 6 e 3 x + 1 2 e x + c 2 \begin{align}
W &= \begin{vmatrix} y_1 & y_2 \\ y_1^{\prime} & y_2^{\prime} \end{vmatrix} = e^{-2x} (e^{-2x}) (1 - 2x) - x e^{-2x}(-2 e^{-2x}) = e^{-4x} \\
%
u_1 &= - \int \frac{x e^{-2x} \cosh x}{e^{-4x}} dx + c_1 = -\int \frac{x \frac{1}{2}(e^x + e^{-x})}{e^{-2x}} dx + c_1 \\
&= -\frac{1}{2} \int x (e^{3x} + e^x) dx + c_1 = -\frac{1}{2} \left[ \frac{1}{9} e^{3x}(3x-1) + e^x(x-1) \right] + c_1 \\
u_1 &= -\frac{1}{18} e^{3x}(3x-1) - \frac{1}{2} e^x (x-1) + c_1 \\
%
u_2 &= \int \frac{e^{-2x} \cosh x}{e^{-4x}} dx + c_2 = \frac{1}{2} \int e^{2x}(e^x + e^{-x}) dx + c_2 = \frac{1}{2} \int (e^{3x} + e^x) dx + c_2 \\
u_2 &= \frac{1}{6} e^{3x} + \frac{1}{2} e^x + c_2
\end{align} W u 1 u 1 u 2 u 2 = ∣ ∣ y 1 y 1 ′ y 2 y 2 ′ ∣ ∣ = e − 2 x ( e − 2 x ) ( 1 − 2 x ) − x e − 2 x ( − 2 e − 2 x ) = e − 4 x = − ∫ e − 4 x x e − 2 x cosh x d x + c 1 = − ∫ e − 2 x x 2 1 ( e x + e − x ) d x + c 1 = − 2 1 ∫ x ( e 3 x + e x ) d x + c 1 = − 2 1 [ 9 1 e 3 x ( 3 x − 1 ) + e x ( x − 1 ) ] + c 1 = − 18 1 e 3 x ( 3 x − 1 ) − 2 1 e x ( x − 1 ) + c 1 = ∫ e − 4 x e − 2 x cosh x d x + c 2 = 2 1 ∫ e 2 x ( e x + e − x ) d x + c 2 = 2 1 ∫ ( e 3 x + e x ) d x + c 2 = 6 1 e 3 x + 2 1 e x + c 2 Then, when we put these all together, we get the full (complicated) solution:
y ( x ) = [ − 1 18 e 3 x ( 3 x − 1 ) − 1 2 e x ( x − 1 ) + c 1 ] e − 2 x + ( 1 6 e 3 x + 1 2 e x + c 2 ) x e − 2 x y(x) = \left[ -\frac{1}{18} e^{3x} (3x-1) - \frac{1}{2} e^x (x-1) + c_1 \right] e^{-2x} + \left( \frac{1}{6} e^{3x} + \frac{1}{2} e^x + c_2 \right) x e^{-2x} y ( x ) = [ − 18 1 e 3 x ( 3 x − 1 ) − 2 1 e x ( x − 1 ) + c 1 ] e − 2 x + ( 6 1 e 3 x + 2 1 e x + c 2 ) x e − 2 x