Consider the motion of a particle of mass m falling vertically under the earth’s gravitational field, and suppose the

downward motion is opposed by a frictional force p(v) dependent on the velocity v(t) of the particle. Then the
velocity satisfies the equation
mv0(t) = 􀀀mg+ p(v); t � 0
Let m = 1kg, g = 9:8m=sec2, and v(0) = 0. Using Euler’s, Heuns’, and Classical Runge-Kutta methods, solve the
differential equation for 0 � t � 20 and for the following choices of p(v):
1. p(v) = 􀀀0:1v
2. p(v) = 0:1v2
Find the answers to at least four digits accuracy. Graph the function v(t). Compare the solutions.

To solve the given differential equation using Euler's, Heun's, and Classical Runge-Kutta methods, we need to discretize the time interval [0, 20] into smaller time steps and iteratively update the velocity at each time step based on the given equation. Here's a step-by-step guide on how to find the solutions:

1. Define the necessary parameters:
- Set m = 1kg.
- Set g = 9.8 m/sec^2.
- Set the initial condition v(0) = 0.
- Specify the time step size, Δt, for discretization.

2. Choose the function p(v) based on the given cases:
a. For p(v) = -0.1v, the equation becomes mv'(t) = -mg - 0.1v.
b. For p(v) = 0.1v^2, the equation becomes mv'(t) = -mg + 0.1v^2.

3. Implement the numerical methods to solve the differential equation:
a. Euler's method:
- Start with the initial condition v(0).
- Iterate over each time step from t = 0 to t = 20.
- Compute v(t + Δt) = v(t) + Δt * [(-mg - p(v(t))) / m].

b. Heun's method:
- Start with the initial condition v(0).
- Iterate over each time step from t = 0 to t = 20.
- Compute the intermediate value v'(t) = v(t) + Δt * [(-mg - p(v(t))) / m].
- Compute v(t + Δt) = v(t) + (Δt / 2) * [(-mg - p(v(t))) / m + (-mg - p(v'(t))) / m].

c. Classical Runge-Kutta method (RK4):
- Start with the initial condition v(0).
- Iterate over each time step from t = 0 to t = 20.
- Compute k1 = Δt * [(-mg - p(v(t))) / m].
- Compute k2 = Δt * [(-mg - p(v(t) + k1/2)) / m].
- Compute k3 = Δt * [(-mg - p(v(t) + k2/2)) / m].
- Compute k4 = Δt * [(-mg - p(v(t) + k3)) / m].
- Compute v(t + Δt) = v(t) + (k1 + 2k2 + 2k3 + k4) / 6.

4. Calculate the solution for each method and plot the velocity as a function of time:
- Iterate over each time step according to the chosen method.
- Compute and store the velocity values at each time step.
- Plot the velocity (v) against time (t) for each case, using the appropriate method.

5. Compare the solutions:
- Analyze the graphs of v(t) for the two different choices of p(v) and the three numerical methods.
- Look for similarities, differences, and any patterns that emerge.
- Compare the accuracy, stability, and computational efficiency of the methods.

By following this guide, you should be able to solve the given differential equation using Euler's, Heun's, and Classical Runge-Kutta methods, and compare the solutions for the two different choices of p(v).