# Thread: Eliminating a variable and then optimizing through differentiation

1. ## Eliminating a variable and then optimizing through differentiation

The goal here is to find the value of Ө, in terms of Ф, that results in the maximum possible value of d. We start with the following equations:

x = (vcosӨ)t = dcosФ
y = (vsin
Ө)t - (1/2)gt2 = -dsinФ
d =
√(x2 + y2)

Originally Posted by My Textbook
By eliminating the variable t between these equations and using differentiation to maximize d in terms of
Originally Posted by My Textbook
Ө, we arrive at the following equation for the angle Ө that gives the maximum value of d:

Ө = 45º - Ф/2

My question is, what exactly are the steps in eliminating t and then using differentiation to maximize d? I suspect that I'm supposed to solve one of the equations for t (e.g., t = (dcos
Ф)/(vcosӨ) or t = x/(vcosӨ))and then plug that t into the other equation. But is that right? And if so, what do I do next?

By the way, that awkward double-quote isn't my mistake, it's some kind of weird bug.

2. ## Re: Eliminating a variable and then optimizing through differentiation

I'll use D instead of d to avoid confusing with derivatives. From the 1st equation you get t = DcosФ/(vcosӨ). PLug that into the second, giving:
-DsinФ = (vsinӨ)(DcosФ/(vcosӨ)) - (1/2)g(DcosФ/(vcosӨ))^2 = D cosФ tanӨ - (g/(2v^2)) D^2 (cosФ)^2 (secӨ)^2, so can cancel a D (D not 0):
-sinФ = cosФ tanӨ - (g/(2v^2)) D (cosФ)^2 (secӨ)^2, and then solve for D:
D = ( sinФ + cosФ tanӨ ) / { (g/(2v^2)) (cosФ)^2 (secӨ)^2 } = ( sinФ + cosФ tanӨ ) ( (cosӨ)^2 ) ( 2v^2/g ) (secФ)^2
D = ( sinФ(cosӨ) + cosФ sinӨ ) (cosӨ) ( 2v^2(secФ)^2 /g ) = sin ( Ф + Ө ) cos(Ө) ( 2v^2(secФ)^2 /g ) (used sine angle sum formula).
Now evaluate dD/dӨ, and then set dD/dӨ = 0, and solve for Ө. For simplicity, let A = ( 2v^2(secФ)^2 /g ), since it is just a constant when thinking of D as a function of Ө.
Have D(Ө) = A sin ( Ф + Ө ) cos(Ө). So dD/dӨ = A cos ( Ф + Ө ) cos(Ө) - A sin ( Ф + Ө ) sin(Ө) = A cos ( Ф + 2Ө ) (used cosine angle sum formula).
Since dD/dӨ = A cos ( Ф + 2Ө ), dD/dӨ = 0 when cos ( Ф + 2Ө ) = 0 when Ф + 2Ө = pi/2 + kpi for any integer k.
Note d^2D/dӨ^2 = -2A sin ( Ф + 2Ө ), so when Ф + 2Ө = pi/2 + kpi, have d^2D/dӨ^2 = -2A sin ( pi/2 + kpi ) = -2A(-1)^k = 2A(-1)^(k+1), and since A positive, have that
d^2D/dӨ^2 is negative when k even, and positive when k is odd. Thus D(Ө) has local maximums occur when k is even, so k=2m for any integer m, so Ф + 2Ө = pi/2 + (2m)pi.
Thus D(Ө) has local maximums at Ө = pi/4 - Ф/2 + mpi for any integer m.