**Summarized Problem:** A ball is thrown with initial speed \(v_0\) up an inclined plane.
The plane is inclined at an angle \(\phi\) above the horizontal, and the ball's initial velocity is at an angle \(\theta\)
above the plane. Choose axes with x measured up the slope, y normal to the slope, and z across it. Write down Newton's second law
using these axes and find the ball's position as a function of time. Show that the ball lands a distance
\(R=2v_o^2\sin\theta\cos(\theta+\phi)/(g\cos^2\phi)\) from its launch point. Show that for given \(v_o\) and \(\theta\), the maximum
possible range up the inclined plane is \(R_{max}=v_o^2/[g(1+\sin\phi)]\)

**Solution:** Let's start by writing down Newton's second law. The only force we really need to consider here is gravity, but because we're dealing with an inclined plane,
we must seperate the gravity force vector \(g\) into two vectors: one that's parallel to the plane and one that's normal to it. Doing this lets us more easily calculate the
ball's position in the air relative to the plane.

Using elementary knowledge of geometry, we can determine that the following:

\[F_x=-mg\sin\phi\]
\[F_y=-mg\cos\phi\]
The force in the z direction would be zero. Here is a diagram to better explain this relationship:

Since we're interested in the ball's position as a function of time, we need to isolate acceleration in the equations above and then integrate twice. Note that the constant produced by the first integral is the initial velocity in the x direction, or \(v_o \cos\theta\), and the constant produced by the second integral is the initial position in the x-direction, or zero. Also note that variables referring to acceleration, velocity, or position denote functions of time.

\[F_x=-mg\sin\phi\] \[\ddot{x}=-g\sin\phi\] \[\int \ddot{x}dt = \int -g\sin\phi dt\] \[\dot{x}= -g\sin\phi t + v_o \cos\theta\] \[\int \dot{x}dt = \int -g\sin\phi t + v_o \cos\theta dt\] \[x = - \frac{1}{2}g\sin\phi t^2 + v_o \cos\theta t\]

Now we can do the same for position in the y-direction.

\[F_y=-mg\cos\phi\]
\[\ddot{y}=-g\cos\phi\]
\[\int \ddot{y}dt = \int -g\cos\phi dt\]
\[\dot{y}= -g\cos\phi t + v_o \sin\theta\]
\[\int \dot{y}dt = \int -g\cos\phi t + v_o \sin\theta dt\]
\[y = - \frac{1}{2}g\cos\phi t^2 + v_o \sin\theta t\]
Based on the information given, we can't determine the ball's position in the z direction. Fortunately, it's not relevant to other parts of the question.

The next part of the question is asking us to show that the distance from the ball's launch point to the point at which it lands can be modelled by the equation
\[R=\frac{2v_o^2\sin\theta\cos(\theta+\phi)}{g\cos^2\phi}\]
To do this, we first need to calculate the time it'll take for the ball to hit the plane, and then calculate the distance it travelled along the x-axis using the function
\(x(t)\) that we just derived.

Let's start with time. We can take advantage of the fact that the ball experiences constant acceleration to determine that by the time the ball hits the
plane, its velocity in the y-direction will be exactly equal to the opposite of its initial vecolicty in the y-direction. Expressed mathematically,
\[-v_{oy} = v_{oy} + a_yt\]
Now we can substitute in the known values for velocity and acceleration, then solve for time.
\[-v_o \sin\theta = v_o \sin\theta - g\cos\phi t\]
\[-2 v_o \sin\theta =- g\cos\phi t\]
\[ t = \frac{2 v_o \sin\theta}{g\cos\phi}\]
Plugging this into \(x(t)\), we get:
\[x = - \frac{1}{2}g\sin\phi \cdot \left(\frac{2 v_o \sin\theta}{g\cos\phi}\right)^2 + v_o \cos\theta \cdot \left(\frac{2 v_o \sin\theta}{g\cos\phi}\right)\]
\[x = - \frac{2v_o^2 g \sin\phi \sin^2 \theta}{g^2 cos^2 \phi} + \frac{2v_o^2 \sin \theta \cos \theta}{g \cos\phi}\]
\[x = - \frac{2v_o^2 \sin\phi \sin^2 \theta}{g cos^2 \phi} + \frac{2v_o^2 \sin \theta \cos \theta \cos \phi}{g \cos^2\phi}\]
\[x= \frac{2v_o^2 \sin \theta (\cos \theta \cos \phi - \sin\theta \sin \phi)}{g \cos^2 \phi}\]
Using one of the sum of angles identities, we get
\[x= \frac{2v_o^2 \sin \theta \cos(\theta + \phi)}{g \cos^2 \phi}\]
The final part of the question asks us to find the maximum distance in the x-direction a ball can be thrown given \(v_o\) and \(\phi\). Considering that we are given
\(v_o\) and \(\phi\), we know that the previous result will be a simple sinusoidal function. That means that we can determine its maximum point by finding and setting its derivative
to 0.

First, let's find the derivative with respect to \(\theta\) (since that's the only variable we're dealing with here):
\[\frac{dx}{d\theta} = \frac{d}{d\theta}\frac{2v_o^2 \sin \theta \cos(\theta + \phi)}{g \cos^2 \phi}\]
\[\frac{dx}{d\theta} = \frac{2v_o^2 [\cos\theta\cos(\theta + \phi) - \sin\theta \sin(\theta + \phi)]}{g \cos^2 \phi}\]
\[\frac{dx}{d\theta} = \frac{2v_o^2 [\cos\theta\cos(\theta + \phi) - \sin\theta \sin(\theta + \phi)]}{g \cos^2 \phi}\]
\[\frac{dx}{d\theta} = \frac{2v_o^2 \cos(\theta + \theta + \phi)}{g \cos^2 \phi}\]
\[\frac{dx}{d\theta} = \frac{2v_o^2 \cos(2\theta + \phi)}{g \cos^2 \phi}\]
Now, since we're looking for a point at which \(\frac{dx}{d\theta}\) is equal to 0, and we know that \(\cos\frac{\pi}{2} = 0 \),
all we need to do is set \(2\theta + \phi = \frac{\pi}{2}\) and solve for \(\theta\). By doing this, we find that
\[\theta = \frac{\pi}{4} -\frac{\phi}{2}\]
Now we can plug this value into our function \(x\) to find the maximum value.
\[x= \frac{2v_o^2 \sin \theta \cos(\theta + \phi)}{g \cos^2 \phi}\]
\[x= \frac{2v_o^2 \sin(\frac{\pi}{4} -\frac{\phi}{2}) \cos[(\frac{\pi}{4} -\frac{\phi}{2}) + \phi]}{g \cos^2 \phi}\]
\[x= \frac{2v_o^2 \sin(\frac{\pi}{4} -\frac{\phi}{2}) \cos(\frac{\pi}{4} +\frac{\phi}{2})}{g \cos^2 \phi}\]
Using a product identity, we get:
\[x= \frac{2v_o^2 \frac{1}{2}[ \sin(\frac{\pi}{2}) - \sin(\phi)] }{g \cos^2 \phi}\]
\[x= \frac{v_o^2[ 1 - \sin(\phi)] }{g (1 - \sin\phi)(1 + \sin\phi)}\]
\[x= \frac{v_o^2}{g(1 + \sin\phi)}\]