![]()
![]()
Computer
Lab Modules![]()
The Method of Variation of Parameters
Background. Use the
method of variation of parameters.
Use Mathematica to implement the method of undetermined
coefficients to find the general solution to the following
differential equations. Then find the solution to the D. E. with the
given initial conditions and plot it.
Computer Lab Work.
Exercise 1. (a) Use the method
of variation of parameters to find the general solution to the D.
E.
y''[t] + y[t] - Tan[t] = 0
1. (b) Find the solution with the
I.C.'s
y[0] = 1, y'[0] = -2,
and plot this solution over the intervals [0, 1.57] and
[0, 15.7]
First, find the roots of the characteristic equation.
Second, enter the two linearly independent functions which are solutions to the homogeneous D. E., and form the solution to the homogeneous D. E. and check it out.
Third, enter the function f[t], form the equations for solving u1'[t] and u2'[t], and find them.
Fourth, integrate u1'[t] and u2'[t] to obtain u1[t] and u2[t] and form the particular solution yp[t], and check it out.
Fifth, the portion
of the solution in u1[t] is usually
expressed as - Log[Sec[t]+Tan[t]]. Use the
necessary trigonometric identities to show that these two quantities
are the same. To convince you that this is the right direction, plot
the two functions to see if their graphs look the same !
If you prefer, to use the v1[t], instead of v2[y], then execute the next two statements.
Sixth, form the general solution.
Seventh, form the linear system for the initial conditions and solve it.
Eighth, form the solution, check it out, and plot it.
Ninth, Mathematica uses the complex number version "Log" of
the natural logarithm function.
If you need to plot the solution over an interval past
you will need to edit the solution and
insert Abs[ ] in the Log[ ].
After you have done all of the above, you are welcome to check your work with Mathematica's built in procedure DSolve.
Exercise 2. (a) Use the method
of variation of parameters to find the general solution to the D.
E.
![]()
2. (b) Find the solution with the
I.C.'s
y[0] = 1, y'[0] = 0,
and plot this solution over the interval [0, 12.6].
First, find the roots of the characteristic equation.
Second, enter the two linearly independent functions which are solutions to the homogeneous D. E., and form the solution to the homogeneous D. E. and check it out.
Third, enter the function f[t], form the equations for solving u1'[t] and u2'[t], and find them.
Fourth, integrate u1'[t] and u2'[t] to obtain u1[t] and u2[t] and form the particular solution yp[t], and check it out.
Fifth, form the general solution.
Sixth, form the linear system for the initial conditions and solve it.
Seventh, form the solution, check it out, and plot it.
After you have done all of the above, you are welcome to check your work with Mathematica's built in procedure DSolve.
If you are concerned that the solutions are different, then you need to use some of Mathematica's trig procedures. Verify that the two expressions z1 and z2 are the same.
Return to the Differential Equations Project
Return to the Numerical Analysis Project
Return to the Complex Analysis Project
(c) John H. Mathews, 1998