Solution for this ODE using MATLAB

96 Views Asked by At

I have the differential equation $$\frac{d^2\theta}{dt^2}=-5.36\sin\theta -7.73 \times 10^{-3} \frac{d\theta}{dt} \bigg|{\frac{d\theta}{dt}}\bigg|$$ with the initial conditions $\theta(0)=30$ degrees and $\frac{d\theta}{dt}(0)=0$. I have tried plotting this on MATLAB, but I am new to it and having some difficulty. Can someone please send the graph of the solution to this differential equation from $t=0$ to $t=100$?

1

There are 1 best solutions below

0
On

I prefer to use GeoGebra to solve ODEs numerically, since the code is quite easy to input:

θ'(t, θ, ω) = ω
ω'(t, θ, ω) = - 5.36 * sin(θ) - 7.73 * 10^(-3) * ω * abs(ω) 
θ_0 = 30
ω_0 = 0
NSolveODE({θ', ω'}, 0, {θ_0, ω_0}, 100)

More details about this command:

https://wiki.geogebra.org/en/NSolveODE_Command

Plot of ODE