Você está na página 1de 3

Additional Instructions for Assignment #10

Problem 22.1
Solve the following initial value problem over the interval from t=0 to 2 where y(0) = 1. Display all
your results on the same graph

dy
= y t 31.5 y
dt

Solve analytically by using the symbolic capability in MATLAB ie use dsolve


Create an euler function to use in your solution to this problem. Remember there is an example in the
PowerPoint. Use both h=0.5 and h=0.25.
Create a midpoint function to use in your solution to this problem. Use h=0.5
Create a heun function to use in your solution to this problem. Use h=0.5
Create a 4th order RK function to use in your solution to this problem with h=0.5
f)
Use the built in ODE 45 technique
g) Be sure to plot your solutions on the same graph dont forget a title, axis labels and a legend.
Problem 22.2
Solve the following initial value problem over the interval from x=0 to 1 using a step size of h=0.25
and y(0) = 1. Display all of your results on the same graph.

dy
=( 1+ 4 x ) y
dt

Solve analytically by using the symbolic capability in MATLAB ie use dsolve


Use the euler function you created in the previous problem.
Create a heun function to use in your solution to this problem.
Use your 4th order RK function you created in the previous problem.
Be sure to plot your solutions on the same graph dont forget a title, axis labels and a legend.
Problem 22.3
Solve the following problem over the interval from t=0 to 2 using a step size of 0.5 where y(0) = 1.
Display all your results on the same graph.

dy
2
=2 y +t
dt

Use the Heun function you created in the previous problem


Use your midpoint function from the previous problem
Use the built in ODE 45 technique
Be sure to plot your solutions on the same graph dont forget a title and axis labels
Problem 22.7
Solve the following pair of ODEs over the interval from t=0 to 0.4, using the built in ode45 function.
The initial conditions are y(0)=2 and z(0) =4.

dy
=2 y +5 et
dt
dz y z
=
dt
2

You will need to create an m-file function to define the system of equations. Remember that the
results need to be a column vector. Display your results as a graph.
Problem 22.8
The van der Pol equation is a model of an electronic circuit that arose back in the days of vacuum
tubes:

d2 y (
2 dy
1 y ) + y=0
2
dt
dt

Given the initial conditions, y(0)=y(0)=1, solve this equation from t=0 to 10 using the built in ode45
function. Display your results as a graph. You will need to reformulate this second order differential
equation into a system of two first order equations.
Problem 22.15
The motion of a damped spring-mass system (as shown below) is described by the following ordinary
differential equation:

d2 x
dx
+c + kx=0
2
dt
dt

where x equals displacement from the equilibrium position (m), t= time (s), m= 20 kg mass, and c=
the damping coefficient (N s/m). The damping coefficient c takes on three values of 5 (underdamped),
40 (critically damped) and 200 (overdamped.) The spring constant k = 20 N/m. The initial velocity
(dx/dt) is zero, and the initial displacement is x = 1 m. Solve this equation using a built-in ode solver
over the time period from t=0 to 15 s. Plot the displacement (x) versus time for each of the three
values of the damping coefficient on the same plot.

Problem 22.18
In the first printing of the third edition there were several mistakes in the material balance the
equations should read as follows

dCA1 1
CA0 CA1 k * CA1
dt

dCB1 1
CB1 k * CA1
dt

dCA2 1
CA1 CA2 k * CA2
dt

dCB2 1
CB1 CB2 k * CA2
dt

Solve this problem with ode45 and present your results as a graph
Problem 22.22
Solve this problem with ode45. Do not try to create a phase plane graph.
Problem 23.2 No additional instructions.
Problem 23.9
Recall from Example 20.5 that the following humps function exhibits both flat and steep regions over
a relatively short x range.

f ( x )=

1
1
+
6
2
( x0.3 ) +0.01 ( x0.9 )2+ 0.04

Determine the value of the definite integral of this function between x=0 and 1 using
a) the quad function
b) the ode45 function. Solving this problem with ode45 depends on the realization that the evaluation
of the definite integral
b

I f ( x)dx
a

is equivalent to solving the differential equation

dy
f ( x)
dx
for y(b) given the initial condition y(a)=0.

Você também pode gostar