Hello I am currently trying to solve a differential equation using Matlab; however, my problem is not with the code but the math. I have achieved at an answer to this question 252.0178 m/s. That is the escape velocity at burnout.
I have assumed the task with my limited knowledge by first me solving the math, then programming. I started by finding out the acceleration equation from the Force equation.
Background of the equation
$m(t)=m_0(1-rt/b)$
$T=48,000$ Newtons
$m_0=2200$ kg
$r=0.8$
$a=9.81$ m/$s^2$
$b=40$ sec.
$$m(t)*\frac{dv}{dt}=T-m(t)g$$ therefore, to get the acceleration equation we divide by the mass
$$\frac{dv}{dt}=\frac{T-m(t)*g}{m(t)}$$
Now doing some basic math I noticed I could cancel out the $m(t)$ by dividing out the function.
$$\frac{dv}{dt}=\frac{T}{m(t)}-g$$
$$\frac{dv}{dt}=\frac{24}{11(1-\frac{.8t}{40})}-9.81$$ and the function is not defined where $m(t)=0$.
I believe that burnout occurs when the acceleration of the rocket is equal to zero. So I then integrated and achieved
$$v(t)= -9.81 t - 109.091 \log(50 - t)+C$$
But C is zero because the initial velocity is zero since the rocket is at rest. And then I plugged the zero of the acceleration function which is $t=36.88$
And I achieved a negative answer -642.608.
However when I changed g back to negative since its pulling the rocket down, and reintergrated the acceleration function, therefore, I got 80.9775
I believe it should be positive since it is going up escaping Earth.
This the beginning of the Matlab code I am just wondering if the quad command should be used since it only does numerical integration.
>> T=48000
T = 48000
mo=2200 mo = 2200 r=0.8 r = 0.80000 g=9.81 g = 9.8100 b=40 b = 40 function y =M(t) y=mo.*(1-(r.*t)/b); end function w = A(t) w= (4800/M(t))-9.81; endtext here