4

Recently I was doing a physics problem and I ended up with this quadratic in the middle of the steps:

$$ 0= X \tan \theta - \frac{g}{2} \frac{ X^2 \sec^2 \theta }{ (110)^2 } - 105$$

I want to find $0 < \theta < \frac{\pi}2$ for which I can later take the largest $X$ value that solves this equation, i.e. optimize the implicit curve to maximize $X$.

I tried solving this by implicit differentiation (assuming $X$ can be written as a function of $\theta$) with respect to $\theta$ and then by setting $\frac{dX}{d\theta} = 0$:

\begin{align} 0 &= X \sec^2 \theta + \frac{ d X}{ d \theta} \tan \theta - \frac{g}{2} \frac{ 2 \left( X \sec \theta \right) \left[ \frac{dX}{d \theta} \sec \theta + X \sec \theta \tan \theta \right]}{ (110)^2 } - 105 \\ 0 &= X \sec^2 \theta - \frac{g}{2} \frac{ 2( X \sec \theta) \left[ X \sec \theta \tan \theta\right] }{ (110)^2 } \\ 0 &= 1 - \frac{ Xg \tan \theta}{(110)^2} \\ \frac{ (110)^2}{ g \tan \theta} &= X \end{align}

This is still not an easy equation to solve. However, one of my friends told we could just take the discriminant of the quadratic in terms of $X$, and solve for $\theta$ such that $D=0$.

Taking discriminant and equating to 0, I get

$$ \sin \theta = \frac{ \sqrt{2 \cdot 10 \cdot 105} }{110}$$

and, the angle from it is, 24.45 degrees

I tried the discriminant method, but it gave me a different answer from the implicit differentiation method. I ended up with two solutions with the same maximum value of $X$ but different angles: $\theta =24.45^\text{o}$ and $X=1123.54$ (from discriminant method), and $\theta = 47^\text{o}$ and $X=1123.54$ (from implicit differentiation).

I later realized the original quadratic can only have solutions if $D(\theta) > 0$, where $D$ is the discriminant. Using the discriminant, I can find a lower bound on the angle. Once I have the lower bound, if I can prove that $X$ decreases monotonically as a function of $\theta$, then I can use the lower bound for further calculations of $\theta$.

So then I used the implicit function theorem and got

$$ \frac{dX}{ d \theta} =- \frac{X \sec^2 \theta -\frac{g X^2}{2 (110)^2} 2 \sec \theta ( \sec \theta \tan \theta) } {\tan \theta - \frac{g \sec^2 \theta}{2 (110)^2} 2X }$$

Now the problem here is that I can't prove this function is in monotonic in terms of $\theta$ as the implicit derivative is a function of both $\theta$ and $X$.

  • 2
    It is not clear what you want to maximize. $X$ and $\theta$ are related by the equation. Do you want the maximal $X$ or $\theta$? – Gribouillis Jul 14 '20 at 10:05
  • 2
    It is still not clear after the edit. If you have $0=f(\theta, X)$, then the maximum of $f$ is $0$. – Gribouillis Jul 14 '20 at 10:11
  • 1
    I want can vary theta and for that I want to find for which theta I can maximize X – tryst with freedom Jul 14 '20 at 10:43
  • I tried fixing it again – tryst with freedom Jul 14 '20 at 10:56
  • Just a comment about notation: Instead of writing $\tan \theta X$, it would be clearer if you wrote $X \tan \theta$ or $(\tan \theta)X$. See what I mean? – Matti P. Jul 14 '20 at 11:12
  • 4
    One way to understand the problem better is to draw a graph! I've changed $\theta \to x$, $X \to y$: https://www.desmos.com/calculator/s6c2jmpcvw . So graphically, the largest value is obtained at $\approx (0.832, 1~123.54)$ – Matti P. Jul 14 '20 at 11:15
  • I did the correction, and I get it intuitively, but I can't reason it in mathematical words – tryst with freedom Jul 14 '20 at 11:24
  • The discriminant method gives the maximal $\theta$, not the maximal $X$ because when $\theta$ is slightly above its maximum, there is not solution $X$, so the discriminant is $<0$. – Gribouillis Jul 14 '20 at 12:39
  • can you rephrase what you mean griboullious? – tryst with freedom Jul 14 '20 at 13:46
  • 2
    Use your last equation to eliminate $X$ from your first equation. Solve for $\theta$. Use that in your final equation to get $X$. The “discriminant method” is not correct. The maximum of $X$ doesn’t occur at the angle making the discriminant zero; it occurs at a greater angle. – G. Smith Jul 14 '20 at 21:56
  • @G.Smith please check the new addition to the qsn – tryst with freedom Jul 15 '20 at 14:07
  • $X$ isn’t monotonic over the region of $\theta$ where $D(\theta)$. Numerically plotting the larger root of the quadratic will make this obvious to you. – G. Smith Jul 15 '20 at 16:22
  • where $ D(\theta)$ ...? I think there should be something else in that sentence. Oh, now if it is monotonic then where would I find the inflection point? – tryst with freedom Jul 15 '20 at 16:23
  • I meant to write “where $D(\theta) >0$”. And you apparently meant to write “if it is not monotonic”. – G. Smith Jul 16 '20 at 18:01
  • Did you read my comment starting “Use your last equation...” about how to complete the calculation? – G. Smith Jul 16 '20 at 18:05
  • I did and I appreciate it, I am not trying to find the answer at this point. I'm trying to figure out why the answer turns out weird depending on the way I do it – tryst with freedom Jul 16 '20 at 18:08
  • You want to find a launch angle $\theta$ for maximum/ optimum $X$, right? – Narasimham Jul 18 '20 at 12:57
  • I want to find optimum X, but indirectly , yes I need an optimum theta for best X – tryst with freedom Jul 18 '20 at 13:05

6 Answers6

8

This is a similar but simple approach which gives the same result. Seeing that $y=\tan(\theta)$ can take any positive value, we go for maximizing $x$ and get $\max(x) = 1123$.

We have: $105 = x\tan\theta-\frac{g}{2} \frac{x^2\sec^2\theta}{(110)^2}$

Let $\ a=105,\ y=\tan\theta,\ b = \frac{g}{2} \frac{1}{(110)^2}.\quad$ Then, $\ a=xy-bx^2(y^2+1)$

Taking $xy=c,\; x^2=\frac{c-bc^2-a}{b}$ (Note that since $y$ can take any positive value, so can $c$)

So, for $\,x_{\max},\quad \frac{d}{dc}\ (\frac{c-bc^2-a}{b}) = 0$ which gives $c=\frac{1}{2b}$

Now, $x_{\max} = \sqrt{\frac{c-bc^2-a}{b}}\quad at\, c=\frac{1}{2b},$ i.e. $\,x_{\max} \approx 1123$ by plugging in values of $a$ and $b.$

K.defaoite
  • 12,536
  • 4
    that's a very weird substitution , can you like give motivation behind the substution's you choose? – tryst with freedom Jul 16 '20 at 15:21
  • 1
    crazy method bro.. my mind is blown. How did you discover this? – tryst with freedom Jul 16 '20 at 18:46
  • I'm trying to figure out why it worked still but Idk why, can you give a brief explanation of what exactly did you did? – tryst with freedom Jul 16 '20 at 18:50
  • 1
    I'm still confused the derivative with c step, because like c=xy, so I don't know the differential of that would look. And why are we optimizing x with respect to c? – tryst with freedom Jul 16 '20 at 20:32
  • 1
    Yes sure. Basically, we can 'play' with this quantity c=xy since c can take on any positive value for all non-zero x because y can take any positive value ($0 < \theta < \frac{\pi}2$). Since c is now just any new variable, we have a relationship between x and c. This allows for maximizing x by taking it's derivative with respect to c. Hope that gives some insight! –  Jul 17 '20 at 03:18
4

I reworded the problem setting $X=y$ and $\theta=x$. Considering $g=9.81$, solving the quadratic equation for $y$ gives the two solutions

$$\displaystyle y =-\frac{ 1100}{981} \cos x \\ \left( \sqrt{10} \sqrt{121000 \tan^2 x - 20601 \sec^2 x} - 1100 \tan x \right)$$

$$\displaystyle y =\frac{ 1100}{981} \cos x \\ \left( \sqrt{10} \sqrt{121000 \tan^2 x - 20601 \sec^2 x} +1100 \tan x \right)$$

The separate plots of the two functions are here and here. The combined plot of the two functions is here. By clarity, I also paste them here:

enter image description here

enter image description here

enter image description here

The maximal value is achieved by the second function. Its derivative is quite complicated, and a closed form for the value of $x$ that maximizes $y$ may probably not exist. However, as already noteď in the OP and in the comments, the numerical solution is given by $x\approx 0.832$ radians (corresponding to about $47.67$ degrees), which leads to a maximum of $y\approx 1123.54$, as confirmed here. By a similar numerical assessment of the first function, it can be confirmed that the symmetrical minimum value of $y\approx -1123.54$ is achieved for $x\approx \pi-0.832\approx 2.309$ radians (corresponding to about $132.33$ degrees), as shown here.

Note that setting the determinant equal to zero, as cited by the OP, only gives the values of $x$ for which the values of the two functions coincide. These values, which have rather tricky closed forms that can be approximated by $x\approx 0.4253$ and $\approx 2.7163$, correspond to the points where the two functions meet, in the leftmost and rightmost portion of the combined plot.

Anatoly
  • 17,079
  • why are there separate plots for the function? – tryst with freedom Jul 16 '20 at 18:11
  • I separated them only for better clarity. They simply correspond to the two solutions obtained for $y$, after writing the equation in its explicit form. – Anatoly Jul 16 '20 at 18:22
  • wait discriminant gives completely wrong? – tryst with freedom Jul 16 '20 at 18:31
  • My friend had calculated it for me and found a near maxima thing but with different angle for it – tryst with freedom Jul 16 '20 at 18:32
  • 1
    The discriminant of the quadratic equation solving for $y$ is not particularly useful to find the maximum. The angle found by your friend ($0.425$ radians or $24.3$ degrees) is that described at the end of my answer and gives the point where the two functions meet. It does not correspond to the maximum. – Anatoly Jul 16 '20 at 20:11
  • thank you so much – tryst with freedom Jul 16 '20 at 20:22
  • I tried plotting this function on wolf ram but it gave no graph, do you know why this might be? – tryst with freedom Jul 16 '20 at 22:38
  • Sometimes implicit plots are not so easy to get using plotters (see https://math.stackexchange.com/questions/1942653/wolfram-alpha-doesnt-plot-implicit-function-with-range). Try to set the range, for example https://www.wolframalpha.com/input/?i=Contourplot+y+tan+x+-+9.81%2F2++y%5E2+1%2Fcos%5E2+x+%2F110%5E2++-+105%3D0%2C+x%3D-pi%2F2+to+pi%2F2%2C+y%3D-1300+to+1300 – Anatoly Jul 16 '20 at 23:12
2

You were on the right track; you just didn't go far enough. Your first equation relating $X$ and $\theta$ is

$$0=X\tan\theta-\frac{g}{2v^2}X^2\sec^2\theta-h\tag1$$

where I've written $h$ for the height of the cliff and $v$ for the initial velocity of the projectile in your original question posted to Physics SE.

(Why did you put in numbers for $h$ and $v$ but not for $g$? Why put in numbers at all, when you can get a nice general formula for any values of these parameters? Why were your values inconsistent between your physics post at your post here?)

You wanted the point on the $X(\theta$) curve that maximizes $X$. As you realized, this is the point where $dX/d\theta=0$.

You could solve (1), which is quadratic in $X$, for $X$ in terms of $\theta$ and then differentiate, set the derivative to zero, solve for $\theta$, and put that back in to find the maximum $X$. This works but involves more algebra than the better approach that you took involving implicit differentiation. You differentiated (1) and set $dX/d\theta$ to $0$, finding

$$\frac{v^2}{g\tan\theta}=X\tag2.$$

The maximum point on the $X(\theta)$ curve satisfies both (1) and (2): (1) because it is a point on the curve, and (2) because it is the maximum point. So you need to solve these two simultaneous equations.

This is straightforward: First use (2) to eliminate $X$ from (1), giving an equation involving only $\theta$:

$$0=\left(\frac{v^2}{g\tan\theta}\right)\tan\theta-\frac{g}{2v^2}\left(\frac{v^2}{g\tan\theta}\right)^2\sec^2\theta-h$$

which simplifies to

$$0=\frac{v^2}{g}-\frac{v^2}{2g}\frac{1}{\sin^2\theta}-h.$$

It's easy to solve this for the value of $\theta$ at the maximum point:

$$\sin\theta=\frac{1}{\sqrt{2-2q}}$$

where $q\equiv gh/v^2$.

From this one finds that

$$\cos\theta=\sqrt{1-\sin^2\theta}=\sqrt{\frac{1-2q}{2-2q}}$$

and

$$\tan\theta=\frac{\sin\theta}{\cos\theta}=\frac{1}{\sqrt{1-2q}}.$$

Substituting this into (2) gives the value of $X$ at the maximum point,

$$X=\frac{v^2}{g}\sqrt{1-\frac{2gh}{v^2}}.$$

Putting in the values $h=105\text{ m}$, $v=110\text{ m/s}^2$, and $g=9.81\text{ m/s}^2$ gives $X=1123.54$ m.

Note that simply completing your solution in this straightforward way does not require the clever substitution that Anonymous used.

Setting the discriminant of (1) to zero does not give the position of the maximum point on the $X(\theta)$ curve. Instead, as Anatoly's graphs show, it gives the point where the two solutions for $X$ coincide. It is also clear from those graphs that the upper solution with the maximum is not monotonic.

G. Smith
  • 597
1

The trick is to write a quadratic in terms of $ \tan \theta $ and not in terms of $X$

$$ 0 = X \tan \theta -\frac{g}{2} \frac{ X^2 (1 +\tan^2 \theta)}{(110)^2} - 105$$

applying the condition that tangent $ D>0$ for the quadratic in terms of $ \tan \theta$(taking g as 10),

I get, this

$$ 1> \frac{20}{(110)^2} ( 105 + \frac{5X^2}{(110)^2})$$

$$ -1100 < X<1100$$

Taking the upper bound, it becomes $X=1100$

  • Why use a trick when none is required and the trick wouldn't work in a more general case, such as when the equation is not quadratic in $\tan\theta$? It is much more useful to learn general methods that always work. – G. Smith Jul 17 '20 at 02:47
  • I agree a 100% , but I just wanted to understand what my friend was trying to tell me :)) Thank you for the support, mr.smith – tryst with freedom Jul 17 '20 at 09:02
1

By letting $u = \tan \theta \in (0, \infty)$, the equation is written as $$\frac{g}{2} \frac{ X^2 (1+u^2) }{ (110)^2 } - X u + 105 = 0.$$ The equation has real roots if and only if its discriminant is non-negative, that is, $D = \frac{(110^2 - 210 g) u^2 - 210 g}{110^2} \ge 0$ (equivalently, $u \ge \sqrt{\frac{210g}{110^2 - 210g}}$). Also, if $D \ge 0$, the equation has two positive real roots (by Vieta's formulas), given by \begin{align} X_1 &= \frac{110^2 u + 110^2\sqrt{D}}{g(u^2+1)}, \\ X_2 &= \frac{110^2 u - 110^2\sqrt{D}}{g(u^2+1)}. \end{align} Clearly, we should choose the larger root, that is, $$X = X_1 = \frac{110^2 (u + \sqrt{D})}{g(u^2+1)}.$$ Clearly, if $D > 0$ (equivalently, $u > \sqrt{\frac{210g}{110^2 - 210g}}$), then $X$ is differentiable with \begin{align} \frac{\mathrm{d} X}{\mathrm{d} u} &= \frac{110^2}{g} \cdot \frac{(1 + \frac{1}{2\sqrt{D}}\frac{\mathrm{d} D}{\mathrm{d} u})(u^2+1) - (u+\sqrt{D})\cdot 2u}{(u^2+1)^2}\\ &= \frac{110^2}{g(u^2+1)^2} \left(1 - u^2 + \left(\frac{(110^2-210g)u(u^2+1)}{110^2 D} - 2u\right)\sqrt{D}\right). \end{align} We have \begin{align} &\frac{\mathrm{d} X}{\mathrm{d} u} = 0 \\ \Longrightarrow \quad & u^2 - 1 = \left(\frac{(110^2-210g)u(u^2+1)}{110^2 D} - 2u\right)\sqrt{D}\\ \Longrightarrow \quad & (u^2 - 1)^2 = \left(\frac{(110^2-210g)u(u^2+1)}{110^2 D} - 2u\right)^2D \\ \Longrightarrow \quad & \frac{210g}{110^4 D}(u^2+1)^2(110^2-(110^2-210g)u^2) = 0\\ \Longrightarrow \quad & u = \frac{110}{\sqrt{110^2 - 210g}}. \end{align} Comparing $X(\sqrt{\frac{210g}{110^2 - 210g}})$, $X(\frac{110}{\sqrt{110^2 - 210g}})$ and $X(\infty)$, we know that $X$ achieves its maximum $\frac{110}{g}\sqrt{110^2-210g}$ at $u = \frac{110}{\sqrt{110^2 - 210g}}$.

For $g = 9.81$, $X$ achieves its maximum $1123.539567$ at $\theta = 47.66952494^\circ$.

River Li
  • 37,323
1

We can proceed directly.. straightforward way. We have the given relation $ (x=X)$:

$$105 = x\tan\theta-\frac{g}{2} \dfrac{x^2\sec^2\theta}{(110)^2} \tag1 $$

To facilitate differentiation let us use symbols for the time being

$$\ h=105,\ V=110 , \tan\theta =t,\dfrac{2v^2}{g}=a \tag2 $$

$$ xt-x^2(1+t^2)/a -h =0 \tag3$$

We need to do implicit differentiation of the fourth order polynomial because $x,t$ are involved together.

Priming with respect to $t$ as independent variable

$$x^{'} t + x -\big[ 2x/a \cdot (1+t^2) \cdot x ^{'} +x^2/a \cdot 2t \big]=0 \tag4 $$

Set $x^{'}=0 $ to find maximum $x,$ and simplify cancelling $x$ on LHS getting

$$ x= \dfrac{a}{2t}\tag5 $$

From (3) and (5) we can find $(t,\theta) $. Plugging this into (3) and simplifying

$$\dfrac{1+t^2}{t^2}=\dfrac{2a-4h}{a} \tag6 $$

$$\dfrac{t^2}{1}=\dfrac{a}{a-4h}\rightarrow t = \tan \theta =\sqrt{\dfrac{a}{a-4h}} =\dfrac{1}{\sqrt{1-2gh/V^2}}\tag7 $$

Plugging this into (5)

$$x_{max}=\dfrac{a}{2}\sqrt{\dfrac{a-4h}{a}} = \dfrac{V^2}{g} {\sqrt{1-2gh/V^2}} \tag8 $$

You can verify sign of second derivative to check it is maximum. To check for the special case

$$ h=0, \; x_{max}= \dfrac{a}{2}= \dfrac{V^2}{g}\tag9 $$

a well known result in projectile motion that the maximum range is double the height reached when projected vertically at angle $\theta =\pi/2 $ to horizontal.

For this particular case put $h=0$ in (7) to tally $ \theta = 45^{\circ} $ okay.

With given numerical values $\; V=110, \; g=9.81,\; h=105,$ we calculate

$$ X_{optimum}=1123.54,\;\theta_{optimum}=46.67^{\circ} \tag {10}$$

Projectile parabolic trajectories are shown below to scale.

By increasing and decreasing $\theta$ by $\pm 30^{\circ} $ the blue, green parabolas should cut $ y=h=105\;$ at values lower than 1123.54 for an optimum $X_m$ red parabola to be valid.. a fact that is graphically also verified.

enter image description here

Narasimham
  • 40,495