A pellet gun is fired straight downward from the edge of a cliff that is 23.1 m above the ground. The pellet strikes the ground with a speed of 38.6 m/s. How far above the cliff edge would the pellet have gone had the gun been fired straight upward?

I get 99.118 but the answer is coming up wrong

To solve this problem, we can use the principle of conservation of energy. When the pellet is fired straight upward, it will reach a maximum height before falling back down. At the maximum height, the kinetic energy of the pellet will be zero, and all the initial energy will be potential energy.

First, let's find the velocity of the pellet when it reaches the ground when fired downward. We can use the equation for the final velocity in free fall:

v^2 = u^2 + 2as

Where:
v = final velocity (38.6 m/s, downward)
u = initial velocity (unknown)
a = acceleration due to gravity (-9.8 m/s^2, since it is acting downward)
s = displacement (23.1 m, downward)

Calculating the initial velocity:

38.6^2 = u^2 + 2*(-9.8)*(-23.1)

u^2 = 38.6^2 + 2*9.8*23.1
u^2 = 1493.96 + 451.44
u^2 = 1945.4
u = sqrt(1945.4)
u ≈ 44.1 m/s

Now we know the initial velocity when fired downward. To find the maximum height when fired upward, we can apply the same conservation of energy principle. At the maximum height, the potential energy will be equal to the initial energy:

mgh = 1/2 mu^2

Where:
m = mass of the pellet (which we'll ignore since it cancels out)
g = acceleration due to gravity (9.8 m/s^2, acting downward)
h = maximum height (unknown)
u = initial velocity (44.1 m/s, upward)

Calculating the maximum height:

h*9.8 = (1/2)*44.1^2

h = (1/2)*44.1^2 / 9.8
h = 0.5*1938.81 / 9.8
h = 969.405 / 9.8
h ≈ 99.05 m

So, if the pellet gun had been fired straight upward, the pellet would have reached a maximum height of approximately 99.05 meters above the cliff edge.