If a box is being pulled up a hill at an angle to find work, its W=Fdcos(angle)

If a hiker is walking up a hill, the work done is W=mgh right?

When do you know when you can use what formula?

No, that is not exactly the formula.

What is better is force*distance*cosTheta, where Theta is the angle between force and distance.

In the case of the hiker, mg is downward, but the force is in the opposite direction, h is vertical, so the angle between force and distance is zero, so it ends up mgh (coszero)=mgh

To determine which formula to use for calculating work, it depends on the situation and the type of force involved.

1. When a force is applied at an angle to the displacement:
If an object is being pulled or pushed at an angle to the direction of displacement, you can use the formula W = F * d * cos(theta), where:
- W is the work done
- F is the applied force
- d is the displacement of the object
- theta is the angle between the force vector and the displacement vector

This formula is applicable when the applied force is not parallel to the direction of motion.

2. When lifting or lowering an object in a gravitational field:
When a force acts against or with gravity to lift or lower an object, you can use the formula W = m * g * h, where:
- W is the work done
- m is the mass of the object
- g is the acceleration due to gravity
- h is the vertical displacement of the object

This formula is generally used when an object is being lifted or lowered vertically in a gravitational field.

It is important to note that these formulas are specific to the work done in different scenarios, and you should choose the formula that accurately represents the situation at hand.