![]() |
Differential EquationsBrown University Applied Mathematics |
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:
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.
Solve the equation y''-3y'-4y=3e^(2x)
Homogeneous Solution
reset()
eq1 := y''(x)-3*y'(x) -4*y(x)
char_eq1 := r^2 -3*r-4
solve(%, r)
homog := C1*exp(-x)+C2*exp(4*x)
Particular Solution
force1 := 3*exp(2*x)
expected := a*exp(2*x)
plugin := subs(eq1, [y(x)=expected, y''(x)=diff(diff(expected,x),x), y'(x)= diff(expected, x)])
solve(plugin=force1,a)
a := (%)[1]
partic := -0.5*exp(2*x)
Full solution
fullsol := homog+partic
Solve the equation y''-3y'-4y=2sin(x)
The Homogeneous solution is the same as the above example.
Particular Solution
force2 := 2*sin(x)
expected := b*cos(x)+c*sin(x)
plugin2 := subs(eq1, [y(x)=expected, y''(x)=diff(diff(expected,x),x), y'(x)= diff(expected, x)])
eq1 := -5*b -3*c
eq2 := 3*b -5*c -2
solve([eq1 =0, eq2=0], [b, c])
b := 3/17
c := -5/17
partic2 := subs(expected, [b=b,c=c])
Full solution
fullsol2 := homog+partic2
Solve the equation y''-3y'-4y=-8e^(-x)
The Homogeneous solution is the same as the above example.
Particular Solution
force3 := 8*exp(-x)
expected3 := x*d*exp(-x)
plugin := subs(eq1, [y(x)=expected3, y''(x)=diff(diff(expected3,x),x), y'(x)= diff(expected3, x)])
solve(plugin=force3,d)
d := (%)[1]
partic3 := d*x*exp(-x)
Full Solution
fullsol3 := homog+partic3
Home |
< Previous |
Next > |