# I Optimization in Projectile Motion

1. Sep 17, 2016

### fog37

Dear Forum,

I am working on projectile motion and optimization these days. Projectile motion uses the kinematic equations of free fall for the vertical direction together with the equations of constant velocity in the horizontal direction.

Maximum Range: if an object is launched at a certain initial speed, the angle theta of maximum range depends on the initial and final height. For example, the angle is 45 degrees for same level launching and landing. The angle decreases as the launching elevation becomes larger than the landing elevation.

Maximum Flight Time: the launching angle will be 90 degrees in the case but the range will be zero. the object is going straight up and will stay in the air the longest in comparison to other situation.

Now, what if I wanted to find the launching angle that produces the largest range and the longest flight time simultaneously? What would I go about that? Is that possible? Do I need to construct a function having two variables, the range and the flight time, and assign some weight factor to each? The weight would give relative importance to range and flight time. I am not sure how to get started on this...
For the previous simple cases (maximize either time or distance), it was simply about setting the first derivatives equal to zero.

thanks,
fog37

2. Sep 17, 2016

### PeroK

You could get, say, 1 point for every metre of the range and, say, 2 points for every second it's in the air.

You would need to set up an equation for the variable "points" in terms of the variable "angle".

3. Sep 17, 2016

### fog37

I am not clear yet. Let's assume that the initial and final levels are the same, i.e. $y_0=y_f=0$. The range has an equation $R(\theta)$ and the time of flight an equation $T(\theta)$. To find the angle for the maximum range we set $\frac {R(\theta)} {d\theta} =0$ and to find the angle for the maximum time we set $\frac {T(\theta)} {d\theta} =0$ .

That said, could you help me understand how to use these two functions, $R(\theta)$ and $T(\theta)$ to create the new function, which we can call MAXI, that would give the angle that simultaneously maximizes both the range and the flight time? Is the function MAXI supposed to be the sum, the product of the two functions $R(\theta)$ and $T(\theta)$, each assigned a weight? For example is the function be something like $MAXI(\theta)$= $a_1 R(\theta)$ + $b_2T(\theta)$ or the product between the two terms?

4. Sep 18, 2016

### PeroK

It's up to you what you want to optimise, but maximising $a R(\theta)$ + $bT(\theta)$ is a good mathematical exercise with a clear solution.

5. Sep 18, 2016

### fog37

I see some problems though. I am summing a function that units of distance to a function that has units of time. What can I do about the coefficients? Do they have units? What should their range be? Should they go from 0 to 1?

6. Sep 18, 2016

### PeroK

$a, b$ are dimensionless, but the problem assumes the SI units. (a points for every metre and b points for every second). Change the units and you automatically change the scoring system. Personally, I'd solve the problem first and then work out what range $a, b$ should have.

Anyway, you should get started by differentiating wrt to $\theta$ the expression $a R(\theta)$ + $bT(\theta)$.

7. Sep 18, 2016

### fog37

The two functions are:

$R(\theta)= \frac {v^2 sin (2\theta)} {g}$ and $T(\theta)= \frac {2 v sin (\theta)} {g}$

which we use to build the function $MAXI (\theta)$:
$$MAXI(\theta)= a_1 \frac {v^2 sin (2\theta)} {g} +b_1 \frac {2 v sin (\theta)} {g}$$

We set the first derivative of MAXI equal to zero:

$$\frac {dMAXI(\theta)}{dt}= 2 a_1 \frac {v^2 cos( 2 \theta)} {g} +b_1 \frac {2 v cos (\theta)} {g} =0$$

$$a_1 v ( 1- 2 sin^{2} (\theta) ) +b_1 cos (\theta) =0$$

$$a_1 v - a_1 v 2 sin^{2} (\theta) = - b_1 cos (\theta)$$

Last edited: Sep 18, 2016
8. Sep 18, 2016

### PeroK

You need to check your derivative of $\sin(2\theta)$

9. Sep 18, 2016

### fog37

thanks. I fixed it. But i am stuck a little bit...

10. Sep 18, 2016

### PeroK

Why did you choose to simplify $cos(2\theta)$ in terms of $sin(\theta)$? Isn't there a better idea?

11. Sep 18, 2016

### fog37

mmm....missing that step:

d [sin(2x)]dx= 2 cos(2x)

cos(2x) can be expanded in terms of sin(x) or in terms of tan(x). Is that what you are referring to?

12. Sep 18, 2016

### fog37

Sorry"

cos(2x) = 2 cos^2 (x) -1

That's it!

13. Sep 18, 2016

### fog37

So $$2a_1 v cos^{2}(\theta) -a_1 v + b_1 cos(\theta)=0$$

Use the quadratic equation now to solve for $cos(\theta)$?

14. Sep 18, 2016

### PeroK

Sounds good.

15. Sep 19, 2016

### fog37

Ok, I applied the quadratic formula and got:

$$\theta= cos ^ {-1} [\frac {-b_1 \pm \sqrt {b_1^2+8 a_1^2 v}} {4 a_1}]$$

not a very friendly solution. Now, what about the values and meaning of the $a_1$ and $b_1$ weight coefficients? Also, how would we call a function like MAXI, that mixes both the distance and the time to find some compromise between them?

16. Sep 19, 2016

### fog37

the initial velocity variable should not be part of the story....

17. Sep 20, 2016

### PeroK

$\cos \theta = \frac{-b + \sqrt{b^2 + 8a^2v^2}}{4av}$

Then, with $\alpha = \frac{b}{4av}$ this becomes:

$\cos \theta = -\alpha + \sqrt{\alpha^2 + \frac{1}{2}}$

You can check this. For range only, you set $b = 0$, hence $\alpha = 0$ and $\cos \theta = \frac{1}{\sqrt{2}}$, hence $\theta = \frac{\pi}{4}$.

And, for time only, you can take $b >> a$, hence $\cos \theta \approx 0$ and $\theta = \frac{\pi}{2}$