Sample solutions for test 2
1. The cascade is modeled by the system of rate equations: y'=-3y+(1+cos(t)), z'=3y-z.
We write the equtions in the normal form of first order linear DEs and use the integrating factor approach:
y'+3y=1+cos(t),
y*e3t=(1+cos(t)) e3tdt = 1/3 e3t + 1/10e3t (3cos (t) +sin(t)) +C1 (using MAPLE for the integration)
The inital condition y(0)=0.3 determines C1=-1/3, and thus the solution is:
y =1/3 (1 - e-3t)+ 1/10(3cos (t) +sin(t))
z'+z=3y= (1 - e-3t)+ 3/10(3cos (t) +sin(t))
z*et=((1 - e-3t)+ 3/10(3cos (t) +sin(t))) etdt =et+ 1/2 e-2t+ 3/10et (cos (t) + 2sin(t)) +C2
The intial condition y'(0)=0.8 determines C2=-1, and thus
z=(1 - e-t) + 1/2e-3t+3/10 (cos (t) +2 sin(t)).
See the MAPLE worksheet for the integration by parts, and the comparison with the complete MAPLE solution.
A comparison with a numerical solution using MATLAB's ode23 is given below.
2. The characteristic polynomial (obtained upon trying y=ert) r2+0.7r+0.1=0 has roots r=-0.2, -0.5.
Consequently 2 independent solutions of the homogeneous equation are y1=e-0.2t and y2=e-0.5t.
Trying a particular solution of the form yp = Acos(t) + B sin(t) upon differentiation and substituion yields
p(D)[yp] = (0.7 B - 0.9 A) cos(t) - (0.9 B +0.7 A) sin(t), which has to equal cos(t).
Since cos(t) and sin(t) are independent functions, this requires 0.7 B - 0.9 A =1 , and 0.9 B +0.7 A = 0.
This linear system in two unknowns has the solutions A=-0.6923 and B=0.5384 (MAPLE).
The general solution of the inhomogeneous DE is:
y= -0.6923 cos(t) + 0.5384 sin (t) +c1* e-0.2t+c2 * e-0.5t
We differentiate
y'= 0.6923 sin(t) + 0.5384 cos (t) -0.2 *c1* e-0.2t- 0.5 *c2 * e-0.5t
and use the initial conditions y(0)=3 and y'(0)=1
3= -0.6923 + c1+c2
1= 0.5384-0.2 *c1- 0.5 *c2
Again, a linear system in 2 unknowns yiedls c1=7.692 and c2=-4.000.
The final solution of the initial value problem is:
y=-0.6923 cos(t) + 0.5384 sin (t) +7.692e-0.2t-4.000 * e-0.5t
3a.) Two functions f and g are independent if af+bg=0 (as a function, for all values of t) implies that a=b=0.
If f and g are solutions of a second order linear DE this is equivalent to saying that for any choice of values for t0,y0 and z0 there exist uniquely determined constants c1 and c2 such that
c1 f(t0)+c2 g(t0) = y0 and c1 f'(t0)+c2 g'(t0) = z0. This is equivalent to the determinant of this system (called the Wronskian of f and g at t0) being invertible. The importance for DEs is that given any two such independent solutions one can solve any initial value problem using linear combinations of f and g.
b.) The step from DE's to differential operators is similar to the one from equations to functions. An equation such as x3-3x+1=0 is satisfied for only a few selected x-values. But even for finding these solutions it is very helpful to consider the function f(x)= x3-3x+1, which may be evaluated for any x value. Its graph is very helpful in analyzing the solutions of the equation.
(Differential) operators are very similar to functions, only their input and output are functions, not numbers. While the DE is satisfied for only very special functions, we may analyze what the operator does to any function. In particular the notion of a linear operator is very helpful: It satisfies L(f+g)=L(f)+L(g) and L(af)=aL(f) for any (differentiable) functions f and g, and any number a. This viewpoint much helps to undertand the structure of the solution set of a inhomogeneous linear DE, like L[y]=f1+f2. If y1 and y2
are solutions of the homogenous DE and yp1, yp2 are such that L[yp1]=f1 and L[yp2]=f2, then the general solution of the DE is y=c1y1+c2y2+yp1+yp2.
c.) The general solution of the DE y''+a(t)y'+b(t)y=f(t) has the form y=c1y1+c2y2+ypwhere y1and y2 are two independent solutions of the homogeneous DE y''+a(t)y'+b(t)y= 0, c1and c2 are constants, and ypis any solution of the inhomogeneous DE. If the coefficients a and b are constant, one easily obtains y1and y2of the form ertwhere r is a root of the characteristic polynomial r2+ar+b=0. For nonconstant coefficients that are of ceratin special forms, many special solution techniques have been discovered. Often one can find a particular solution by guessing the appropriate formyp=a1g1+a2g2...... with the g polynomial, sinusoidal, exponential etc.) and then tryiong to detremine the undetermined coefficientsaiwhich leads to a system of linear equations.More general, but often longer is the method of variation of parameters which reduces the problem to a simple integration.
The m-file cascade.m contains the following instructions:
function xdot=cascade(t,x)
xdot=[-3*x(1)+1+cos(t),3*x(1)-x(2)];
The following MATLAB commands check our solution graphically against a numerical solution:
path('c:\fc\match\diffeqns',path);
[t,y]=ode23('cascade',0,20,[0.3,0.8]);
yy=(1-exp(-3*t))/3+(3*cos(t)+sin(t))/10;
plot(t,y(:,1),'r-',t,yy,'bo');
The m-file oscill.m contains the following:
function xdot=oscill(t,x)
xdot=[x(2),-0.1*x(1)-0.7*x(2)+cos(t)];
The following MATLAB commands check our solution graphically against a numerical solution:
[t,y]=ode23('oscill',0,50,[3,1]);
yy=-0.6923*cos(t)+0.5384*sin(t)+7.692*exp(-0.2*t)-4*exp(-0.5*t);
plot(t,y(:,1),'r-',t,yy,'bo');