Block 6

May 13, 2009

After a semester full of discovering new ways to solve differential equations, we have now come to the end. In block 6 we will cover the last method this semester of solving differential equations. We will be taking a look at the laplase transform to linear diff. eq. This method uses a transformation to change the domain of the differential equations.  To transform and then convert the problems back and forth a list of identities can be used. Another way is to simply solve the problems using matlab or mathematica.

In this block I will be choosing 6 examples  in which will be completed. 2 first-order equations, 2 second-order equations, and 2 linear systems will be chosen in order to show the use and function of these laplase transforms

laplasesolver.m:

function [x] = laplasesolver (f,y_final,y_mult)
syms s t
laplace(f,t,s);
b=1/(s+(y_mult))
x=ans+(y_final);
figure
ezplot(x,[-20,20])
final=x*(b)
ilaplace(final,s,t);
a=ans;
figure
ezplot(a,[10,15])
end

 

  FIRST ORDER EQUATION EXAMPLES

1.   $\latex \frac{dy}{dt}+y=3cos(t)$ ,y(0)=-1

>> laplasesolver(3*cos(t),-1,1)

b =
1/(s + 1)

final =
((3*s)/(s^2 + 1) – 1)/(s + 1)

ans =
(3*cos(t))/2 – 5/(2*exp(t)) + (3*sin(t))/2

 

Using ilaplace to transform the function to the time domanin

$\latex y(t)=7cos(4*t)$ 

612

2.  $\latex\frac{dy}{dx}-y=e^(3t), y(0)=2 $

entering this into the m file produces:

b =
1/(s – 1)

final =
(1/(s – 3) + 2)/(s – 1)

ans =
exp(3*t)/2 + (3*exp(t))/2

 

solution graph:

 622

SECOND ORDER EQUATION EXAMPLES:

1. $\latex \frac{d^2y}{dt^2}+16y=0$ , y(0)=7, y’(0)=0

$\latex L{\frac{d^2y}{dt^2}}=s^2L{y(s)}-7s$

$\latex s^2L{y(s)}-7s+16L{y(s)}=0$

$\latex (s^2+4)L{y(s)}=7s$

$\latex L{y(s)}=\frac{7s}{(s^2+16)}$

 

 

Using ilaplace to transform the function yeilds the solution:

 

$\latex y(t)=7cos(4*t)$

SOLUTION GRAPH:

632

2. $\latex \frac{d^2y}{dt^2}+4y=0$ , y(0)=2 , y’(0)=3

$\latex L{\frac{d^2y}{dt^2}}=s^2L{y(s)}-2s-3$

$\latex s^2L{y(s)}-2s-3+4L{y(s)}=0$

$\latex (s^2+4)L{y(s)}=2s+3$

$\latex L{y(s)}=\frac{2s+3}{(s^2+4)}$

 

 

the simplified laplace transform yeilds the final solution:

 

$\latex y(t)=2cos(2*t)+ \frac{3}{2}sin(2*t)$

SOLUTION GRAPH:

642


Block 5

May 1, 2009

In Block 5, I will be looking at systems of Differential Equations.  Systems of Differential Equations are linked by multiple variables as opposed to just one like in previous blocks. In order to study and solve complicated systems we need to use more than one dependent variable as well as multiple equations.

Problem 1: T(x,y)=(x+y,x)

We can seperate this equation in two:

dx/dt=x+Y

dx/dt=x

The first thing we  need to do is set (x+y,x)=(λx,λy)

This simplifies into two separate equations of

x+y = λx                         x = λy

In order to solve for the value/s of λ I set the two equations equal to zero

(1-λ)x+y=0

xλy=0

The next step we used the equation ad-bc=o solve for λ where

a=(1-λ), b=1, c=1 and d=-λ

These values are found by setting the two equations equal to ax+by=0 and cx+dy = 0.

For this example  we will use the values λ=+.6103 and λ=-.6103

Finally, plug the final λ value into one of the original equations of

(1-λ)x+y=0

x-λy=0

then we  solve for y to get thesolutions for the equation as follows;

     y=0.618034x and         y=-1.618034x

Here is the code that I wrote to graph the solutions along with the vector field:

[x,y]=meshgrid(-1:1/10:1,-1:1/10:1);
>> u=2*x+y;
>> v=x+y;
>> w=sqrt(u.^2+v.^2);
>> quiver(x,y,u./w,v./w,.5,’.’)
>> hold on
>> f=@(x).618034*x;
>> fplot(f,[-1,1],’r’)
>> hold on
>> f=@(x)-1.61803*x;
>> fplot(f,[-1,1],’g’)
>> hold off
>> hold off

51

Example 2: 

dx/dt=x+3y

dy/dt=y

λ-1

Solution: Red: y=0

52

Example 3:

dx/dt=2x+5y

dy/dt=x-2y

λ=-0.23606 and λ=4.23607

Soutions:

Red: y= -1         Green: y=0.2

53

Example 4:

dx/dt=-4x-3y

dy/dt=-2x+4y

λ=√22

Solution: Red: y= -2.8968x

54

Example 5:

dx/dt=2x+2y

dy/dt=2x+y

λ=-0.56155 and λ=3.5616

Solutions:

Green: y= -1.2807x                Red: y= 0.7807x

55

Example 6:

dx/dt=2x-2y

dy/dt=2x+y

λ=(3+√-15)/4 and λ=(3-√-15)/4
56

Solution: non – real


Follow

Get every new post delivered to your Inbox.