





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






Section:
Name and email address:
This exam is a fifty-minute exam (the entire class period). The exam is closed book and
closed notes. A non-graphing pocket calculator can be used. You are on your honor not to
consult with your classmates. Cheating will not be tolerated and will result in immediate
and strict action.
Please feel free to use any pictures, graphs, flow charts, code fragments, or written comments in
describing your understanding of the problems and their solutions. Be sure to clearly state any
assumptions or conditions regarding the solution. Please write all of your answers on these
sheets. You may use the back of the paper if necessary. A total of 100 points are awarded.
An equation sheet is included on the last page of this exam.
Honor Code Statement:
My signature below indicates that I have read the above text. On my honor, I pledge that I have
neither given nor received inappropriate aid in the preparation of this examination. I also pledge
that I have not spoken with any students who have previously taken the ME 2016 exam today.
Further, I will not discuss this exam with any other student taking ME 2016 this semester who
has not yet taken the exam until after all the exams have been given (5PM on the day of the
exam).
Circle True or False. If False, briefly explain your reasoning
because Simpson 1/3 is generally more accurate.
True / False
dy y dt
= + is a linear differential equation, the first order Euler’s method will solve
it exactly.
True / False
discussed in class, the time step should be chosen sufficiently small otherwise the solution may
become unstable.
True / False
True / False
formulated as a system of first-order differential equations.
True / False
Consider the integral
7
0
, where f(x) is shown below.
0 1 2 3 4 5 6 7
0
1
2
3
4
x
f(x)
Compute the integral as accurately as possible using only the given data.
x f(x)
4.1. Problem Formulation (10 points)
While driving down the highway at 108 km/h (30m/s), a car suddenly runs out of gas, the engine
halts, and the car cruises to a stop. Provide a complete mathematical model that allows one to
compute the velocity of the car as a function of time, starting at the moment the engine stops.
The equation of motion is based on Newton’s law: mass times acceleration equals the sum of the
forces. In this case, there are two forces:
F drag = CD ρ Avcar
Frolling = μ rmg cos( α)
As in the homework assignments, you can assume that the car has the following parameters:
air density, ρ : 1.29 kg/m
3
2
rolling coefficient, μ r : 0.
slope, α : 0 degrees
2
4.2. Solving a differential equation (20 points)
Using a 4
th order Runge Kutta method, solve the following differential equation:
Perform 2 iterations with a step size of 1 second each.
The script below implements Heun’s method for solving the differential equation
5 sin( 1) 0
dy y t dt
correct all mistakes of logic and syntax.
(Note: you get +3 points when you identify an error correctly, and -2 when you identify an error
where there is none — you can end up with a negative score for this question).
f = @(y,t)(y*sin(t+1)/5);
y_initial = 1;
num_steps = 1000;
start_time = 0;
end_time = 100;
y = zeros(1,num_steps);
t = linspace(start_time, end_time, num_steps);
h = (start_time - end_time)/num_steps;
y(0) = y_initial;
for i=1:num_steps
y_predicted = y(i) + f(y(i),t(i))*h;
y(i+1) = y(i) + f(y(i+1),t(i+1))*h;
end
plot(t,y);
grid on;
Equation Sheet
n
− = ×
with 1
e m b m b
with | |
x (^) t eps eps b x
( ) ( ) 2 ( ) ( ) ( ) ( )( ) ( ) ( ) 2!!
n n n
f a f a f x f a f a x a x a x a R n
( 1) ( ) 1 ( ) ( 1)!
n n n
f R x a n
= −
l u r
x x x
new old r r u^ l a new r u l
x x x x
x x x
0
n a n
x E
u l u r u l u
f x x x x x f x f x
1
i i i i
f x x x f x
2 , 1 ,
r t i t i r
f x E E f x
2
1
n
r i i
= (^) ∑
2
1
n
t i i
= (^) ∑ − ( ) ( )
T T Z Z A = Z Y
(^1 2 ) ( )
i i i i
i i
n x y x y a n x x
∑ ∑ ∑
∑ ∑
a 0 (^) = y − a x 1 1
n
i i
x x n (^) =
= (^) ∑
2 t r
t
r S
2 2 2 2
i i i i
i i i i
n x y x y r
n x x n y y
∑ ∑ ∑
∑ ∑ ∑ ∑
1 0 1 0 0 1 0
f x f x f x f x x x x x
1 1 1 2 0 1 1 0 0
n n n n n n n
f x x x f x x x f x x x x x x
− − − −
f (^) n ( ) x = f ( x 0 (^) ) + f x [ 1 (^) , x 0 (^) ]( x − x 0 (^) ) + f x [ 2 (^) , x 1 (^) , x 0 (^) ]( x − x 0 (^) )( x − x 1 (^) ) + f x [ (^) n , xn (^) − 1 ,..., x 0 (^) ]( x − x 0 (^) )( x − x 1 (^) )...( x − xn − 1 )
b b
n a a
I = f x dx ≅ f x dx ∫ ∫
f a f b I b a
3 ( ) ( ) 12
t
b a
1
0 1
n
i n i
f x f x f x
I b a n
−
=
∑ 3
2
t
b a E f n
f x f x f x I b a
5 ( ) (^) (4) ( ) 2880
t
b a