quarter 4 problem 4

December 9, 2008

(Intro)

Equation #1) >> syms A B s t; ilaplace(3*(2+s)/(s^2+2*s-1)+4/(s^2+2*s-1)+1/(s*(s^2+2*s-1)))

ans =  (4*(cosh(2^(1/2)*t) + 2^(1/2)*sinh(2^(1/2)*t)))/exp(t) – 1

q44

Second Order Differential Equation under 4 separate conditions

>> syms A B s t; x=ilaplace(A*(2+s)/(s^2+2*s-1)+B/(s^2+2*s-1)+1/(s*(s^2+2*s-1)),s,t)
x =
((cosh(2^(1/2)*t) + (2^(1/2)*sinh(2^(1/2)*t)*((2*A + B + 2)/(A + 1) – 1))/2)*(A + 1))/exp(t) – 1

quarter 3 problem 3

October 30, 2008

Positive/Negative

>> [x,y]=meshgrid(-1:1/10:1,-1:1/10:1);

>> x = 5*x + 4*y;

>> y = 2*x + y;

>> quiver(x,y,u,v,1)

??? Undefined function or variable ‘u’.

>> [x,y]=meshgrid(-1:1/10:1,-1:1/10:1);

>> u = 5*x + 4*y;

>> v = 2*x + y;

>> quiver(x,y,u,v,1)

The above graph shows the exact slope of the field at any given point. You can see in this graph that at any point the slope is either in the negative direction or the positive direction given the positive and negative eigen values.

>> [x,y]=dsolve(‘Dx=5*x+4*y’,'Dy=2*x+y’,'t’)
x =
C10*exp(3*t + 2*3^(1/2)*t) + C11*exp(3*t – 2*3^(1/2)*t) + 3^(1/2)*C10*exp(3*t + 2*3^(1/2)*t) – 3^(1/2)*C11*exp(3*t – 2*3^(1/2)*t)
y =
C10*exp(3*t + 2*3^(1/2)*t) + C11*exp(3*t – 2*3^(1/2)*t)

I used matlab to find the exact solution (shown above) in relation to the variable “t” We had problems using matlab in the first place because we didn’t know how to input multiple variables, however when we figured it out, matlab was the biggest adversary we could have used for finding exact solutions for a system of differential equations.

Negative/Negative

>> [x,y]=meshgrid(-1:1/10:1,-1:1/10:1);

>> u = -3*x + 2*y;

>> v = 4*x – 3*y;

>> quiver(x,y,u,v,1)

The above graph shows the exact slope of the field at any given point. You can see in this graph that at any point the slope is in the negative direction given the two negative eigen values.

>> [x,y]=dsolve(‘Dx=-3*x+2*y’,'Dy=4*x-3*y’,'t’)
x =
(2^(1/2)*C6*exp(2*2^(1/2)*t – 3*t))/2 – (2^(1/2)*C7)/(2*exp(3*t + 2*2^(1/2)*t))
y =
C6*exp(2*2^(1/2)*t – 3*t) + C7/exp(3*t + 2*2^(1/2)*t)

Positive/Positive

>> [x,y]=meshgrid(-1:1/10:1,-1:1/10:1);

>> u = 2*x + y;

>> v = x + 3*y;

>> quiver(x,y,u,v,1)

The above graph shows the exact slope of the field at any given point. You can see in this graph that at any point the slope is in the positive direction given the two positive eigen values.

>> [x,y]=dsolve(‘Dx=2*x+y’,'Dy=x+3*y’,'t’)
x =
(5^(1/2)*C4*exp((5*t)/2 + (5^(1/2)*t)/2))/2 – (C5*exp((5*t)/2 – (5^(1/2)*t)/2))/2 – (C4*exp((5*t)/2 + (5^(1/2)*t)/2))/2 – (5^(1/2)*C5*exp((5*t)/2 – (5^(1/2)*t)/2))/2
y =
C4*exp((5*t)/2 + (5^(1/2)*t)/2) + C5*exp((5*t)/2 – (5^(1/2)*t)/2)

Using matlab was a great asset.  The equations in matlab showed the equations as they were and the graphs and field lines showed great visuals for those equations.  Together, they both aid in the learning of this material.

quarter 2 problem 2

October 7, 2008

 

Using Euler’s Method to obtain a solution to a first order differential equations is helpful because it is simple and when you plot on excel, you can find answers to any point. Using separation of variables or any other numerical approach to find a solution is much more challenging, however it is also much more precise. If you do need an exact answer, Euler’s Method can yield a greater margin of error.

The problem with Euler’s method is trying to find a result down the list at say x=300. Euler’s method is not nearly as accurate as finding the solution using separation of variables. Inputing the initial condition sets the tone for Euler’s Method but the accuracy decreases proportionately to how far down the list you go.

Sometimes you can not get an exact solution at all using any method. Finding a solution to one of these problems requires a numerical approximation the solution.

Excel Graphs:

 

x(t) v. y(t)

X(t) v. y(t) v. z(t)

 

 

 

 

0.185319355 0.146301433 0.784226924
0.181417563 0.195274514 0.763585331
0.182803258 0.242733408 0.743577318
0.188796273 0.290131703 0.724192314
0.198929816 0.338726094 0.705428277
0.212909444 0.389635875 0.687290683
0.230582087 0.443890853 0.669792503
0.251912964 0.502470508 0.652954903
0.276968718 0.566336554 0.63680856
0.305905502 0.636460669 0.621395574
0.338961018 0.71384872 0.606771993
0.376449789 0.799562597 0.593011076
0.41876107 0.894740523 0.580207399
0.466359015 1.000616535 0.568482026
0.519784767 1.118539727 0.557988971
0.579660263 1.249993722 0.548923264
0.646693609 1.396616769 0.541531028
0.721685925 1.560222765 0.536122032
0.805539609 1.742823479 0.533085352

Graphing these numbers using excel has a very limited use.  Since excel does not graph in 3D space, we only get a limited view of what the numbers actually look like.  We can somewhat view the randomness of the numbers, how close they are to each other and the general shape of the graph using excel, however it does not give us much more than that.  Using other programs to plot a 3D graph would be much more helpful in deciphering the graphs.  Plotting the graphs gave my parter and I difficulty at first.  We plotted 3 out of the 4 graphs just fine but the x(t) v. z(t) graph gave us trouble.  Our professor had to explain to us how to plot two rows in excel that weren’t next to each other.  After we got everything plotted, plugging them into my page was my next problem.  Again my professor explained how to copy the file and paste it in the page using the program “preview.”   

 

 

 

Mat Lab Graphs:

function yprime = test_example ( t, y )
yprime = y*(2./t-1);

function yprime = new_example ( t, y )
yprime = (2*t^2)-(y);

 

At first, while plotting these graphs, I had a problem in that the numbers kept changing on me.  Every time I would plot a different graph I would get different numbers.  My partner and I consulted our professor and he reminded us that we had put the numbers on a random setting, which would account for the constant change.  We were assured this was not a problem.  The numbers are set to such an extreme (4000) that a small change will not effect the graph’s overall shape. 

Hello world!

September 2, 2008

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!


Follow

Get every new post delivered to your Inbox.