Differential Equations

Variation of Parameters<!-- --> | Differential Equations

Variation of Parameters

Sharan Sajiv Menon - September 6th, 2021


The method of variation of parameters can be used to solve non-homogenous differential equations, it works on a wider variety of differential equations than the method of undetermined coefficents.

We have a second order differential equation of the following form:

d2ydx2+pdxdy+qy=f(x)\frac{d^2y}{dx^2}+p\frac{dx}{dy}+qy=f(x)

The solution to the homogenous DE y+py+qy=0y'' + py'+qy=0:

yh=y1+y2y_h=y_1+y_2

The formula for the particular solution ypy_p

yp=y1(x)y2(x)f(x)W(y1,y2)dx+y2(x)y1(x)f(x)W(y1,y2)dxy_p= -y_1(x)\int \frac{y_2(x)f(x)}{W(y_1, y_2)}dx + y_2(x)\int\frac{y_1(x)f(x)}{W(y_1, y_2)}dx

Steps

There is a kind of general formula to follow.

  1. Solve the homogenous equation d2ydx2+pdxdy+qy=0\frac{d^2y}{dx^2}+p\frac{dx}{dy}+qy=0​ to get yhy_h
  2. Calculate the wronskian W(y1,y2)W(y_1, y_2) where yp=y1+y2y_p=y_1 + y_2.
  3. Plug the functions into the integral, y1y_1, y2y_2, f(x)f(x), W(y1,y2)W(y_1, y_2)
  4. Solve and simplify the integral to get ypy_p
  5. The general solution is y=yh+ypy = y_h + y_p

Problem 1: Solve the following differential equation: y+8y+16y=4xy''+8y'+16y=4x

Solution 2: General solution is y=yh+ypy = y_h + y_p​.

We find yhy_h first by solving the homogenous DE y+8y+16y=0y'' + 8y' + 16y=0​. Characteristic polynomial is m2+8m+16y=0(m+4)(m+4)m=4m^2 + 8m + 16y=0 \rightarrow (m+4)(m+4) \rightarrow m=-4

Since there is one solution for mm, yh=c1e4x+c2xe4xy_h=c_1e^{-4x} + c_2xe^{-4x}​.

Now we find the Wronskian where y1(x)=e4xy_1(x)=e^{-4x}​​ and y2(x)=xe4xy_2(x)=xe^{-4x}​​​.

y1(x)y2(x)y1(x)y2(x)=e8x\begin{vmatrix} y_1(x) &y_2(x) \\y_1'(x) & y_2'(x) \end{vmatrix}=e^{-8x}

Now, we plug into the integral, note that f(x)=4xf(x)=4x

yp=e4xxe4x4xe8xdx+xe4xe4x4xe8xdxy_p= -e^{-4x}\int \frac{xe^{-4x}4x}{e^{-8x}}dx + xe^{-4x}\int\frac{e^{-4x}4x}{e^{-8x}}dx

Simplify

yp=4e4xx2e4xdx+4xe4xe4xxdxy_p= -4e^{-4x}\int x^2e^{4x}dx + 4xe^{-4x}\int e^{4x}xdx
yp=4e4x(1x2e4xdx+xe4xxdx)y_p= 4e^{-4x}(-1\int x^2e^{4x}dx + x\int e^{4x}xdx)

When we solve the integral and get the constants, just set the C=0C=0​​ to remove it (and make sure to remove anything attached to the CC).

Solving the integral we get:

Steps for Integration. Click the link to see how this was integrated.

yp=x418y_p=\frac{x}{4}-\frac{1}{8}

Therefore, the general solution is

y=c1e4x+c2xe4x+x418y=c_1e^{-4x} + c_2xe^{-4x} + \frac{x}{4}-\frac{1}{8}

Problem 2: Solve the differential equation y3y=9e3ty''-3y'=-9e^{3t}

Solution 2:

Find yhy_h: m23m=0m(m3)m=0,3m^2-3m=0\rightarrow m(m-3) \rightarrow m=0,3​​. Therefore, yh=c1+c2e3ty_h=c_1+c_2e^{3t}​​

Get the Wronskian W(y1,y2)=3e3tW(y_1, y_2) = 3e^{3t}. Remember f(x)=9e3tf(x)=-9e^{3t}

Plug into the equation for ypy_p

yp=9e3te3t3e3tdt+e3t9e3t3e3tdty_p= -\int \frac{-9e^{3t}e^{3t}}{3e^{3t}}dt + e^{3t}\int\frac{-9e^{3t}}{3e^{3t}}dt

This integral simplifies into the following.

yp=3e3tdt+e3t3dty_p= 3\int e^{3t}dt + e^{3t}\int -3dt

This is a simple integral, solve and simplify to get the following answer for ypy_p.

yp=e3t3te3t=e3t(13t)y_p = e^{3t}-3te^{3t} = e^{3t}(1-3t)

The general solution y=yh+ypy = y_h + y_p is

y=c1+c2e3x+e3t(13t)y=c_1+c_2e^{3x} + e^{3t}(1-3t)

Created by Sharan Sajiv Menon, © 2022