A child throws a rock vertically at 15.0 m/s. It lands on his roof 3.0m above the ground. How long was the rock in the air and what was its speed just before it hit the roof?

hf=hi+vi*t-4.9t^2

3=0+15t -4.9t^2

put this in standard quadratic form, and solve for t.

t=(-b+-sqrt(b^2-4ac))/2a

speed: either vf=vi-g t or
vf^2=vi^2+2g*3.0

where g=-9.8m/s^2 on that last formula.

To find the time the rock was in the air and its speed just before it hit the roof, we can begin by using the kinematic equations.

First, let's identify the given information:
Initial vertical velocity (vi) = 15.0 m/s (upward)
Initial vertical displacement (y) = 0m (as the rock is thrown from the ground)
Final vertical displacement (y') = 3.0m (height of the roof)

Now, let's find the time the rock was in the air:
Using the kinematic equation for vertical displacement:
y' = vi * t + (1/2) * g * t^2

Substituting the known values:
3.0m = 15.0m/s * t + (1/2) * (-9.8m/s^2) * t^2
This is a quadratic equation in t, so let's solve it.

Rearranging the equation:
(1/2) * (-9.8m/s^2) * t^2 + 15.0m/s * t - 3.0m = 0

We can either solve this equation using the quadratic formula or factorization to find the values of t.

Using the quadratic formula (ax^2 + bx + c = 0):
The coefficients are:
a = (1/2) * (-9.8m/s^2) = -4.9m/s^2
b = 15.0m/s
c = -3.0m

The quadratic formula is:
t = (-b ± √(b^2 - 4ac)) / (2a)

Substituting the values, we have:
t = (-15.0m/s ± √((15.0m/s)^2 - 4 * -4.9m/s^2 * -3.0m)) / (2 * -4.9m/s^2)

Simplifying the equation and solving for t:
t ≈ 1.67s or t ≈ 0.77s

Since the rock was thrown upward and then came back down, we can discard the negative time value. Therefore, the rock was in the air for approximately 0.77 seconds.

To find the speed just before it hit the roof:
Using the kinematic equation for vertical velocity:
v = vi + g * t

Substituting the values:
v = 15.0m/s + (-9.8m/s^2) * 0.77s

Solving for v:
v ≈ 15.0m/s + (-7.546m/s) ≈ 7.454m/s

Therefore, the speed of the rock just before it hit the roof was approximately 7.454 m/s.