100% Guaranteed Results


PHYS2160 Introductory Computational Physics Solved
$ 29.99
Category:

Description

5/5 – (1 vote)

1. Write a Python program that solves the differential equation

with the initial condition y(1) = 5.0 for 1 ≤ x ≤ 5 using Euler’s method with number of steps N = 10,20,50,100 and then compares the numerical solutions with the analytical solution y = 1/9 + 2x/3 + 38e−3(x−1)/9 by plotting them on the same graph.
2. Write a Python program that solves the differential equation
with the initial condition 5 using the second order RungeKutta method with number of steps N = 10,20,50,100 and then compares the

numerical solutions with the analytical solution y = px/(6 − 5e1−x) by plotting them on the same graph.
3. Write a Python program that solves the differential equation

with the initial condition y(1) = −0.6 for 1 ≤ x ≤ 5 using the fourth order RungeKutta method with number of steps N = 10,20,50,100 and then compares the numerical solutions with the analytical solution y = (1+2×8)x/(1−6×8) by plotting them on the same graph.
4. The Lorenz model is a simple atmospheric model that simulates weather patterns by the Lorenz equations

where σ,ρ,β are positive parameters in the model. Write a Python program that solves these equations with the initial conditions (x(0),y(0),z(0)) = (0,1,0) from t = 0 to t = 50 for σ = 10,ρ = 28,β = 8/3 using the fourth order Runge-Kutta method with step size h = 0.001 and then makes a plot of x, y, and z as a function of time t as well as a plot of z against x and y. From the latter plot, you should see a picture of the famous “strange attractor” of the Lorenz equations, a lop-sided butterfly-shaped plot that never repeats itself.
5. An object of mass m falling near the Earth’s surface is retarded by air resistance proportional to the square of its speed. According to Newton’s laws of motion, its motion is governed by the differential equation:

6. A nonlinear pendulum like the one in Example 8.5 can be driven by exerting a small oscillating force horizontally on the mass. Then the equation of motion for the pendulum becomes

where θ(t) is the angular displacement of the pendulum at time t, and C and Ω are positive constants. Write a Python program that solves this equation with the initial conditions (θ(0),θ0(0)) = (0,0) from t = 0 to t = 100s for ` = 0.1m, C = 2s−2, Ω = 5s−1 using the fourth order Runge-Kutta method with step size h = 0.001s and then plots θ as a function of time t.
7. A damped oscillator driven by an external force undergoes motion governed by the differential equation:

where x(t) is the displacement of the oscillator at time t, and γ, ω0, F0, and ω are positive constants. Write a Python program that solves this equation with the initial conditions (x(0),x0(0)) = (10m,0) from t = 0 to t = 20s for γ = 1s−1, ω0 = 10rad/s, F0 = 50m/s2, and ω = 12rad/s using the fourth order Runge-Kutta method with target accuracy per unit time δ = 10−6 and then plots x as a function of time t.

2
3

Reviews

There are no reviews yet.

Be the first to review “PHYS2160 Introductory Computational Physics Solved”

Your email address will not be published. Required fields are marked *

Related products