# I Height reached by an object

Tags:
1. Jun 23, 2016

### nos

Hello everyone,

I was playing around with some equations regarding air resistance. I tried to calculate the height that is reached by an object that is projected vertically into the air. However something seems to go wrong when integrating.

Starting with the equation of motion
\begin{align*}
m\frac{dv}{dt}=-mg-kv^2.
\end{align*}
Setting \begin{align*}a=\sqrt{\frac{km}{g}},\\
v(0)=v_0.
\end{align*}
Then the solution to this differential equation is
\begin{align*}
v(t)=\frac{\tan{(\arctan{(av_0)}-gt})}{a}.
\end{align*}
Then the time it take to slow the object to a standstill(where it reaches maximum height) is
\begin{align*}
t_{end}=\frac{\arctan{(av_0)}}{g}.
\end{align*}

So the distance traveled in this time can be found by integrating the velocity function over this time.

\begin{align*}
h&=\int_0^{t_{end}}\frac{\tan{(\arctan{(av_0)}-gt})}{a}dt\\
&=\frac{1}{ga}(\ln{\cos{(arctan{(av_0)}-gt_{end})}}-\ln{\cos{(\arctan{(av_0)}}}.
\end{align*}
I did not even bother going through with it, it's going to come out negative.

I'm not actually sure this is the right antiderivative. Or maybe I lost a minus sign somewhere. I can't spot it.
Thanks :)

2. Jun 23, 2016

### Staff: Mentor

Something went wrong with units, the formulas cannot be right.

3. Jun 23, 2016

### Mr-R

How are you sure that you can solve this analytically? I think it can only be solved numerically. I could be wrong though.

4. Jun 24, 2016

### vanhees71

It's solvable by separation of constants:
$$-\frac{m}{mg+k v^2} \mathrm{d} v=\mathrm{d} t.$$
Because we have
$$\int \mathrm{d} v \frac{m}{mg+k v^2} =\frac{1}{g} \int \mathrm{d} v \frac{1}{1+(\sqrt{k/(mg)} v)^2} = \sqrt{\frac{m}{gk}} \arctan \left (\sqrt{\frac{k}{mg}} v \right),$$
we get
$$\sqrt{\frac{m}{gk}} \left [\arctan \left (\sqrt{\frac{k}{mg}} v \right)-\arctan \left (\sqrt{\frac{k}{mg}} v_0 \right) \right]=-t.$$
This gives you $v(t)$. Integrating once more gives $h(t)$.

5. Jun 24, 2016

### nos

This is the correct answer for the velocity function. I realised I missed a constant and instead \begin{align*}
a=\sqrt{\frac{k}{mg}}\end{align*}

So \begin{align*}
v(t)=\sqrt{\frac{mg}{k}}\tan{\Big[\arctan{\Big(\sqrt{\frac{k}{mg}}v_0\Big)}-\sqrt{\frac{gk}{m}}t\Big]}
\end{align*}
Integrating this
\begin{align*}
h&=\sqrt{\frac{mg}{k}}\int_0^{t_{end}} \tan{\Big[\arctan{\Big(\sqrt{\frac{k}{mg}}v_0\Big)}-\sqrt{\frac{gk}{m}}t\Big]}dt\\
&=\frac{m}{k}\Big[\ln{\cos{0}}-\ln{\cos{\Big(\arctan{\big(\sqrt{\frac{k}{mg}}v_0\big)}\Big)}}\Big]\\
&=-\ln{\Big(\sqrt{1+\frac{k}{mg}v_0^2}\Big)}.
\end{align*}

This will give me a negative height, which is impossible.

Last edited: Jun 24, 2016
6. Jun 24, 2016

### Staff: Mentor

The cosine of something cannot exceed 1, so the logarithm of it has to be negative or zero. The second last line is always zero or positive, not sure what happened afterwards.

7. Jun 24, 2016

### nos

Oh right thanks, so the second last line is positive. I tried to simplify the answer a bit more and this is where I think made a mistake.
Imagine a triangle with angle θ.
\begin{align*}
\theta=\arctan{\sqrt{\frac{k}{mg}}v_0}
\end{align*}
Then the opposite and adjacent sides are
\begin{align*}
O&=\sqrt{\frac{k}{mg}}v_0\\
A&=1
\end{align*}
Then the cosine of this configuration must be \begin{equation*}\cos{\theta}= \frac{\sqrt{1+\frac{k}{mg}v_o^2}}{1}\end{equation*}

Edit: I see this is the secant and not cosine haha, so that will account for the minus sign :) thanks for replying

8. Jun 24, 2016

### Staff: Mentor

In the last equation there is a square root missing and you have to swap numerator and denominator. Taken out of the log that gives a factor -1/2 which makes the result positive.

9. Jun 24, 2016

### wrobel

the formulas could be much shorter

Let $s$ be the path, $\dot s=v$. Then equation
takes the form
$m\frac{dv}{ds}v=-mg-kv^2$ and
separating variables we get
$$s-s_0=\int_{v_0}^0\frac{mvdv}{-mg-kv^2}=-\frac{m}{2k}\ln(mg+kv^2)\Big|_{v_0}^0$$