So I am culminating all of my newfound knowledge to solve and show a simple calculus problem. However I am running into issues...
Given: A piecewise function where v(t)=70t @ t<=20s & 1596.2-9.81t @ 20<t<t_max <---(eq 1)
Also given: s(t)=35t^2+7620 @ t<=20s & 1596.2t-4.905t^2-8342 @ 20<t<=t_max <---(eq 2)
Find: If aircraft ignites its engines at t=0s and accelerates vertically, there is only enough fuel for an engine burn of 20 seconds. At which time will the ship become a projectile? Find value of t_max. Plot the crafts velocity vs. t, (eq 1). Plot the crafts altitude vs. t, (eq 2).
My Solution:
tmaxr=roots([-9.81, 1596.2]);
title('Velocity vs. Time')
s(N)=1596.2.*t(N)-4.905.*t(N).^2-8342;
title('Position vs. Time')
Issue: So I have found t_max, plotted the velocity but it looks funky, and also tried to plot my altitide but not sure if it's faultless.
P.s. Sorry for the formatting, there's no easy way to type piecewise functions that I know of.