Math 255 Computer Assignment Part 2: Due 11/15/2007
For
more computer commands click here
In this assignment we want to explore some more of the functions
in Maple/Mathematica/Matlab to do the sorts of calculations we
have done recently.
1. First have the program solve 3 or more constant coefficient
homogenous differential equations of order > 3. If you wish you can
check the computer by first determining what the solutions will be
(using the D factoriztion of the diff. eq.), have the software mutliply
out the resulting polynomial and then assk it to solve it. For ex. we
know (D^2-4)(D^2+4)^3 give us a set of fund solutions e^(2t), e^(-2t),
cos(2t), tcos(2t) ... etc so have the software multiply out the
polynomial (D^2-4)(D^2+4)^3 and then input is as a diff.
eq and ask it to solve the eqn.
2. Next take the equations above and make them non-homogenous- for each
one add functions where we could apply the method of undetermined
coefficients, pick some of the parts of the function g(t) to be
homogenous solutions. You may take examples from the text sec. 4.3 if
you like.
Next try some (again 3) functions g(t) where we
cannot guess a candidate, rational functions, trig. fcns. other than
sin and cos, other exponential fcns., log functions etc. Maple has a
built in command to do variation of parameter problems (varparam).
Again, you can take problems from sec 4.4 if you like.
Variation of parameters for higher order equations
requires taking larger Wronskians (this is built into the Maple
command). So next have the software compute 3 or more Wronskians of at
least 5 functions (this would be a sum of something like 60 2 by 2
Wronskians which would be a lot of work but the software can do it
easily. For each set of functions pick the functions to be in the same
family (approximately) like a bunch of exp. functions (you can include
some multiplied by polynomials), or just look at a bunch of
polynomials, you can pick a bunch of solutions to a particular diff
eq., see if you can construct 5 functions that do not "look" like they
are related but end up with a Wronskian of zero.
3. Try to solve at least 4 more
general higher order diff. eqs using series (aka "formal series" or
"Taylor series" or "Power series"). Pick equations of order at least
three- that have non-constant coefficients, they may be non-linear,
non-homogenous, whatever you like. Try to include initial conditions on
one or two of them.
For more computer commands click
here
Some Maple commands:
For Reduction of order - Maple: reduceOrder
Variation of Parameters- Maple: varparam
To Solve constant coefficient diff. eqs. - Maple: constcoeffsols
For Series solutions: in Maple here are some commands to look into:
dsolve(ode,y(x),'formal_series','coeffs'='rational');
dsolve( {ode}, y(t), type=series);
Examples:
dsolve({diff(y(x),x,x)+y(x)=0,D(y)(0)=1,y(0)=1},y(x),type=series);
dsolve({diff(y(x),x,x,x)+y(x)=0,(D@@2)(y)(0)=3,D(y)(0)=1,y(0)=1},y(x),type=series);
note to denote higher derivatives for initial conditions you can use
(D@@n)(y)(x_0) where n is the order of the derivative and x_0 is
wherever you want to specify the initial condition.
For Wronskians:
A := vector([exp(x),cosh(x),sinh(x)]);
Wr := wronskian(A,x);
Some Mathematica Commands
DSolve seems to handle most of the differential equations in
Mathematica and I have not encountered specific other commands.
Also there is no special command for Wronskian calculations, so I
suspect that you need to input the functions and the derivatives into a
matrix then use the determinant command for that matrix: Det - you can
use the toolbar on the side to enter a matrix or you can use curly
brackets {{a,b,c},{d,e,f},{g,h,i}} represents the matrix with row 1
a,b,c and row 2, d,e,f row 3 g,h,i.
For Series solutions- it looks as though Mathematica will just give the
solutions in terms of integrals but the command Series[f, {x,x_0,n}] to
create a power series about the point x_0 (the rest of it tells
Mathematica that x is the variable and n is how many terms to compute).
Example:
DSolve[y'[x]==3y[x],y[x],x]
{{y[x]->e3xC[1]}
Then use cut and paste
Series[e3xC[1],{x,2,10}]
will give you the first 11 terms in the series for the solution.