Project 3

October 23, 2008

\frac{dx}{dt}=ax+by

\frac{dy}{dt}=cx+dy

Using the following code in Mathematica, we were able to obtain a picture of the flow, along with two invariant lines. The roots are located at $ y=( 1 \pm \sqrt[5] \div(2) -1$

$\sqrt[3]{x+y}$

Needs["VectorFieldPlots`"];

A1 = VectorFieldPlot[{x + y, x}, {x, -1, 1}, {y, -1, 1},
PlotPoints -> 20, ScaleFactor -> 0.2, Axes -> True];
A2 = Plot[(1 + (Sqrt[5]/2) – 1)*x, {x, -1.5, 1.5}];
A3 = Plot[(1 - (Sqrt[5]/2) – 1)*x, {x, -1.5, 1.5}];
Show[A1, A2, A3]

invariant

While examining the next equation:

T[(x,y)]=(ax+by, cx+dy)

We were able to determine the Eigen values and obtain a picture of the flow for randomly defined variables along the range -5 \leq a, b, c, d \leq 5.

a = RandomInteger[{-5, 5}]
b = RandomInteger[{-5, 5}]
c = RandomInteger[{-5, 5}]
d = RandomInteger[{-5, 5}]
MatrixForm[{{a, b}, {c, d}}]
VectorFieldPlot[{a*x + b*y, c*x + d*y}, {x, -1, 1}, {y, -1, 1},
PlotPoints -> 20, ScaleFactor -> 0.2, Axes -> True]
Eigenvalues[{{a, b}, {c, d}}]

0

3

4

-3

( 0 3 )

( 4 -3)

{1/2 (-3 – Sqrt[57]), 1/2 (-3 + Sqrt[57])}

invariant-2


Project 2

October 2, 2008

First Euler Test

Lorenz ODE45


Lorenz Euler 2d

Although we received the following error and output, the plot was created and displayed successfully:

>> y_init = [ rand(); rand(); rand() ];
>> [ t, y ] = euler_system ( ‘lorenz_system’, [ 0.0, 20.0 ], y_init, 1000 );
??? Error using ==> plot
Data must be a single matrix Y or a list of pairs X,Y

Error in ==> euler_system at 34

Lorenz ODE45

Read the rest of this entry »


First Differential Equation

September 11, 2008

I am exploring the differential equation \frac{dy}{dx}=\frac{y^2+1}{x^2+1}

Graphing calculator

Expanded Limits

Excel 1

Excel 2

Using the Matlab add-on DFields, developed by John C Polking of Rice University, we were able to obtain the following direction field graph.

We also sought a direct solution for the equation using the command:

>> sol = dsolve(‘Dy/Dx = (y^2 + 1)/(x^2+1)’)

We obtained the result:

sol =

x(t)=tan(atan(y(t))+C1)


Follow

Get every new post delivered to your Inbox.