Professional Documents
Culture Documents
Mathematical Modeling & Simulation: Assignment #3
Mathematical Modeling & Simulation: Assignment #3
Question:1
Patch Diagram:
dy
y t 2 , where y(0) = 1.0
dt
Analytical Solution
dy
y t2
dt
The integrating factor is
I.F= exp(dt)
=exp(-t)
So
et
dy t
e y t 2et
dt
Comparison:
Or
d (et y) t 2et dt
Question:2
d 2 x / dt 2 A
x(0) = 0.0, dx/dt = 1.0 at t=0
Patch Diagram:
250
A=-5
A=-3
A=0
A=2
A=5
200
150
x(t)
x(t)
100
100
-100
50
-200
-300
x(0)=-25
x(0)=-10
x(0)=0
x(0)=10
x(0)=25
200
5
time ' t '
-50
10
5
time (t)
10
10
50
A=5
A=2
A=0
A=-3
A=-5
40
30
dx(t)/dt
dx(t)/dt
20
20
-20
10
-40
-60
x'(0)=-10
x'(0)=-5
x'(0)=0
x'(0)=5
x'(0)=10
40
5
time (t)
10
-10
5
time (t)
Question:3
The gravitational acceleration as a function of altitude is given by
g=G M/( R+y(t) )2
where M=5.9742 1024 kilograms,
R=6.4 106 m,
d2y
dy
GM / ( R y ) 2 ( ) 2
2
dt
dt
Patch Diagram:
Velocity(m/s)
2.5
1.5
0.5
0
0
5
time (s)
10
Question:4
d 2 x / dt 2 A sin t
x(0) = 0.0, dx/dt = 1.0 at t=0
Patch Diagram:
y
To Workspace
d2x/dt2
dx/dt
1
s
1
s
Integrator
Scope
x
A*sin(t)
0
Integrator1
Gain
A*sin(t)
sin(t)
t
sin
Ramp
10
Trigonometric
Function
Gain1
250
200
A=20
X(t)
150
100
A=10
A=5
50
-50
5
time (t)
10