diff --git a/Checkpoints/Checkpoint3.ipynb b/Checkpoints/Checkpoint3.ipynb index 6c973dda1cba03cff54ad2ac9342171a6a847fb4..7c7e90f1b37f9fe1be2b834ed5fdfec9fc07e132 100644 --- a/Checkpoints/Checkpoint3.ipynb +++ b/Checkpoints/Checkpoint3.ipynb @@ -29,11 +29,11 @@ "\n", "The solutions to this equation take the following forms:\n", "\n", - "$$ x=\\exp(−γt/2)[a\\cosh(pt)+b\\sinh(pt)] \\text{when} γ>2ω_0 \\text{with} p^2=(γ^2/4)−ω^2_0 $$\n", + "$$ x=\\exp(−γt/2)[a\\cosh(pt)+b\\sinh(pt)] \\text{ when } γ>2ω_0 \\text{ with } p^2=(γ^2/4)−ω^2_0 $$\n", "\n", - "$$ x=\\exp(−γt/2)[a+bt] \\text{when} γ=2ω_0 $$\n", + "$$ x=\\exp(−γt/2)[a+bt] \\text{ when } γ=2ω_0 $$\n", "\n", - "$$ x=\\exp(−γt/2)[a\\cos(ωt)+b\\sin(ωt)] \\text{when} γ<2ω_0 \\text{with} ω^2=ω^2_0−(γ^2/4)$$\n", + "$$ x=\\exp(−γt/2)[a\\cos(ωt)+b\\sin(ωt)] \\text{ when } γ<2ω_0 \\text{ with } ω^2=ω^2_0−(γ^2/4)$$\n", "\n", "where these three conditions are known as over damped, critically damped and under damped respectively.\n", "\n", @@ -41,17 +41,17 @@ "\n", "With the initial conditions that x=1 and $\\dot{x}$ =0 at t=0 the above constants, after some manipulation, become,\n", "\n", - "a=1 $b=\\gamma/2p$ when $\\gamma$>2ω$_0$\n", + "a=1 $b=\\gamma/2p$ when $\\gamma$>$2ω_0$\n", "\n", - "a=1 $b=\\gamma/2$ when $\\gamma$=2ω$_0$\n", + "a=1 $b=\\gamma/2$ when $\\gamma$=$2ω_0$\n", "\n", - "a=1 $b=\\gamma/2ω$ when $\\gamma$<2ω$_0$\n", + "a=1 $b=\\gamma/2ω$ when $\\gamma$<$2ω_0$\n", "\n", "### Task\n", "\n", - "Write an interactive Python program to compute and display, using the pyplot function from Matplotlib, the solution for x against t for t in the range 0$\\to 5\\pi/ω_0$. Your program should:\n", + "Write an interactive Python program to compute and display, using the pyplot function from Matplotlib, the solution for x against t for t in the range $0 \\to 5\\pi/ω_0$. Your program should:\n", "\n", - "- Ask for and read in the values of ω$_0$, $\\gamma$ and the number of points to plot on the graph from the terminal.\n", + "- Ask for and read in the values of $ω_0$, $\\gamma$ and the number of points to plot on the graph from the terminal.\n", "- Use a function of form shm(omega_zero,gamma,t) to calculate the displacement.\n", "- Calculate and plot the amplitude and time to lists\n", "- Plot the output via pyplot with suitable title and labels to axis\n",