## Abstract:

The point of this lab is to model the drag of a falling cupcake. To model the drag we are using Euler's Method. After using Euler's Method I got a drag of 0.00375(+/-0.00075).

## Description:

In this project, the Euler Method was used to model the drag of a falling cupcake and compare it to the actual equation. To start off, we needed to have data to base the model off of. The data used was from the slide https://physlets.org/tracker/download/air_resistance.pdf by Douglas Brown. Once the data was found, the model equation needed to be derived. The equation is:

$$ +b v^2 - m g = m \frac{dv}{dt}$$

For this equation, the gravity was $g\approx 9.8\,{\rm m/s^2}$ and the mass was $m\approx 3.5\,{\rm g}$.

Next, we have to solve the equation for whatever we are updating, because the Euler Method is a simple update method. Below are the steps for Euler's method:

- First, determine the rate of change: $\frac{ds}{dt} = f_s(s,t)$
- Second, solve for the change during a time step: $$\Delta s \approx f_s(s,t) \Delta t$$
- Finally, update the the old value: $$s
*{\rm new} = s*{\rm old} + \Delta s$$

Using this formula and the know value, will help show the usefullness of Euler's Method. Once we have the graph created using Euler's method, it was compared to the individual data points. The only thing chaged was the b(drag) to find the best fit of the graph. Additionally, I found the analytical solution by finding the integral of the equation and compared it to the Euler Method graph.

## Algorithm and Discussion:

The algorithm used in this project involved the Euler Method. The Euler Method is a prcess that involves the user to find approximate values of an equation based off of its derivative. Like mentioned in the description:

- First, the derivative of the equation is found: $\frac{ds}{dt} = f_s(s,t)$
- Next, the equation solves for the change in the state using the time step: $$\Delta s \approx f_s(s,t) \Delta t$$
- Finally, the origional state is updated by adding the $\Delta s$ to the $s
*{\rm old}$: $$s*{\rm new} = s_{\rm old} + \Delta s$$

Once this calculation is completed, it will be ran through a loop of all of the time values wanted. This loop will create a list with all of the data points needed. Once the loop is created a graph can be plotted that takes the data from the lists created by the loops. It is important to note that this data and graph is not exact, but it is a good representation of the data. This is very helpful because if we wanted to do this by hand it would take a lot of time. It is also helpful because if we want the algorithm to be more accurate, the time step just has to be changed to a smaller number.

## Implementation and code:

## Results

Above are the graphs of the actual data, the Euler Method, and the Analytical solution. To find the graph of the Euler method, we had to set up a loop to use the Euler Method for the given equation. Once the loop was created we had to fit the graph to the origional data. To fit the graph the b(drag constant) had to be adjusted. Origionally, the drag constant was set to 0.001, but the graph did not match up with the data points and went too low. To adjust this, I played with the value and found that 0.00375 +/- 0.00075 is the approximate appropriate range. After finding a good Euler model, I compared it to the analytical solution and the graphs look almost identical. In a situation where Euler's method was not as accurate, one solution would be to increase the number of time steps for the problem. The more time steps means better accuracy because there is less time for error. Another way to get better results is to find a more accurate approximation method. Currently we have not learned other methods, so this one will work for now.

# Conclusion

The goal of this report was to use Euler's method to model the falling of a muffin cup. The eqution used included forces of gravity and forces of air resistance/drag. After conducting the calculations, the drag coefficient was 0.00375 +/- 0.00075. This modle was then compared to the analytical solution. Since this equation was not too complicated and the time steps were short enough, the Euler Model and the analytical solution were almost exaclty the same.