Differential Equations

Brown University Applied Mathematics


Undetermined Coefficient Method

To solve any non-homogeneous solution, we will need to add the homogeneous solution to the particular solution. The method of Undetermined Coefficients is an easy way to find the particular solution for your final answer. The steps to following this method are generally:

  1. Guess a function similar to that of your forcing term multiplied by an extra coefficient to be determined. For polynomials, each term needs a coefficient. For example, the forcing term $-4x^2 +3x$ yields a guess of $Ax^2+Bx$. For exponentials, you will need to make sure that the term is linearly independent from the homogeneous solutions, else we must multiply by the independent variable in addition to the undetermined constant to make it so. For example, a forcing term of $8e^{-4x}$ where $Ce^(-4x)$ was already NOT a homogeneous solution would yield a guess of $Ae^{-4x}$, where if $Ce^{-4x}$ was already a homogeneous solution would yield a guess of $Ae^{-4x}x$. For trigonometric functions, we need to guess a solution in the form A*cos(p*x)+B*sin(p*x) where p is similar to the forcing term you already have. For example, a forcing term of $3cos(-x)$ would yield a guess of $Acos(-x)+Bsin(-x)$. Similarly, if the trigonometric functions are not linearly independent from all of the homogeneous solutions, we can multiply by the independent variable until it is.

  2. Solve for the undetermined coefficients by plugging in your guesses into the original differential equation for y(x) and all of its derivatives and make sure it is equal to your forcing term.
  3. Add the homogeneous and particular solutions together to obtain the full solution

MuPAD Examples

Solve the equation y''-3y'-4y=3e^(2x)

 

Homogeneous Solution

reset()

eq1 := y''(x)-3*y'(x) -4*y(x)

(D@@2)(y)(x) - 3*D(y)(x) - 4*y(x)

char_eq1 := r^2 -3*r-4

r^2 - 3*r - 4

solve(%, r)

{-1, 4}

homog := C1*exp(-x)+C2*exp(4*x)

C1*exp(-x) + C2*exp(4*x)

 

Particular Solution

force1 := 3*exp(2*x)

3*exp(2*x)

expected := a*exp(2*x)

a*exp(2*x)

plugin := subs(eq1, [y(x)=expected, y''(x)=diff(diff(expected,x),x), y'(x)= diff(expected, x)])

-6*a*exp(2*x)

solve(plugin=force1,a)

{-1/2}

a := (%)[1]

-1/2

partic := -0.5*exp(2*x)

-0.5*exp(2*x)

 

Full solution

fullsol := homog+partic

C1*exp(-x) - 0.5*exp(2*x) + C2*exp(4*x)

 

Solve the equation y''-3y'-4y=2sin(x)

 

The Homogeneous solution is the same as the above example.

 

Particular Solution

force2 := 2*sin(x)

2*sin(x)

expected := b*cos(x)+c*sin(x)

b*cos(x) + c*sin(x)

plugin2 := subs(eq1, [y(x)=expected, y''(x)=diff(diff(expected,x),x), y'(x)= diff(expected, x)])

3*b*sin(x) - 3*c*cos(x) - 5*b*cos(x) - 5*c*sin(x)

eq1 := -5*b -3*c

- 5*b - 3*c

eq2 := 3*b -5*c -2

3*b - 5*c - 2

solve([eq1 =0, eq2=0], [b, c])

{[b = 3/17, c = -5/17]}

b := 3/17

3/17

c := -5/17

-5/17

partic2 := subs(expected, [b=b,c=c])

(3*cos(x))/17 - (5*sin(x))/17

 

Full solution

fullsol2 := homog+partic2

(3*cos(x))/17 - (5*sin(x))/17 + C1*exp(-x) + C2*exp(4*x)

 

Solve the equation y''-3y'-4y=-8e^(-x)

 

The Homogeneous solution is the same as the above example.

 

Particular Solution

force3 := 8*exp(-x)

8*exp(-x)

expected3 := x*d*exp(-x)

d*x*exp(-x)

plugin := subs(eq1, [y(x)=expected3, y''(x)=diff(diff(expected3,x),x), y'(x)= diff(expected3, x)])

-5*d*exp(-x)

solve(plugin=force3,d)

{-8/5}

d := (%)[1]

-8/5

partic3 := d*x*exp(-x)

-(8*x*exp(-x))/5

 

Full Solution

fullsol3 := homog+partic3

C1*exp(-x) - (8*x*exp(-x))/5 + C2*exp(4*x)


Home

< Previous

Next >