Using Mathematica to solve an ODE

1 reply · 1K views · last reply
Ashley1nOnly
Messages
132
Reaction score
3

Homework Statement


Printed textbook problem 1.50 about a skateboard released from 20 degrees, asking for a Mathematica NDSolve solution with R = 5 m and g = 9.8 m/s^2, and a comparison with approximate solution (1.57).


Homework Equations


Typeset equation (1.51): the second derivative of phi with respect to time equals negative g over R times sin phi, a pendulum equation of motion.

Equation (1.57): phi(t) = phi_0 cos(omega t), a cosine function of time t with amplitude phi_0 and angular frequency omega.


The Attempt at a Solution



I used the NDSolve function from mathematic but its giving me problems. What is the correct way to enter the equation?[/B]
soln = NDSolve[{y''[t] = (-9.8/5)*sin (t), y[0] = 20, y, {x, 0, 12}}]
 
Attachments
  • Typeset equation (1.51): the second derivative of phi with respect to time equals negative g over R times sin phi, a pendulum equation of motion.
    upload_2018-9-4_13-1-2.png
    1 KB · Views: 739
  • Equation (1.57): phi(t) = phi_0 cos(omega t), a cosine function of time t with amplitude phi_0 and angular frequency omega.
    upload_2018-9-4_13-1-36.png
    1.1 KB · Views: 746
  • Printed textbook problem 1.50 about a skateboard released from 20 degrees, asking for a Mathematica NDSolve solution with R = 5 m and g = 9.8 m/s^2, and a comparison with approximate solution (1.57).
    upload_2018-9-4_13-2-12.png
    28.2 KB · Views: 670
(1) The right hand side is not sin(t), it is sin(y[t]).

(2) Look more carefully at the syntax of the Mathematica NDSolve example below. Is your input in this form?

s = NDSolve[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1}, y, {x, 0, 30}]