An object is launched upward at a rate of 20 ft/s from a position of 100 feet. A
ID: 1720470 • Letter: A
Question
An object is launched upward at a rate of 20 ft/s from a position of 100 feet. Assume gravity is 32 ft/s^2. Using Euler's method with At = 0.1. determine the object's maximum position and at what time that occurs. Also determine at what time the object hits the groand and what the velocity is at that time. Using the exact equation of motion for the object to determine the object's maximum position and at what time that occurs. Similarly determine the exact value for the time at which the object hits the groand and what the velocity at that time. Calculate the relative error between the exact equation and Euler's method for this problem.Explanation / Answer
The general gravity equation for the velocity with respect to time is
v = gt + v0
v0 is the initial upward velocity which will be negative.
The equation of motion of the object is: dy/dt= 32t + (-20)=32t-20
Initial condition: y(0) = 100
Implement Euler method.
function [t,y] = euler(tspan)
f=inline('32*t-20','t','y');
y0 = 100;
m = length(y0);
t0 = tspan(1);
tf = tspan(2);
h = 0.1;
N = (tf-t0)/h;
t = linspace(t0,tf,N+1);
y = zeros(m,N+1);
y(:,1) = y0';
for n=1:N
y(:,n+1) = y(:,n) + h*f(t(n),y(:,n));
end
t = t'; y = y';
end
-----------------------------------------------------------
Experiments:
(a) Part-1:
>> [t,y]=euler([0,100]); % You may increase the upper limit of time interval if not found in this range.
>> [t y]
Look at the results when y (second column) is maximum.
Also note the corresponding time in the first column.
Do all the experients in this way.
Change the upper limit of time interval if required e.g, [0,100], [0,200] etc.
Part-2:
Look at the results when y in the second column is 0 (touches the ground).
Also note the corresponding time in the first column.
Use this time to find the velocity at that time from the equation of motion.
(b)
Solve the equation analytically by the method of seperation of variables.
Now, you have y(t).
Find maximum value of y using calculus.
When the object hits the ground, velocity is 0.
Calculate the relative errors using the results of part (a) and (b) carefully by hand and calculator.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.