Using Mathematica to solve an ODE

  • Thread starter Thread starter Ashley1nOnly
  • Start date Start date
  • Tags Tags
    Mathematica Ode
AI Thread Summary
The discussion focuses on using Mathematica's NDSolve function to solve an ordinary differential equation (ODE). The user encounters issues with their initial input, specifically noting that the right-hand side should be sin(y[t]) instead of sin(t). Additionally, guidance is provided to review the syntax of NDSolve, emphasizing the correct format for entering equations. A comparison is made to a provided example to clarify proper usage. Correcting these elements is essential for successfully solving the ODE in Mathematica.
Ashley1nOnly
Messages
132
Reaction score
3

Homework Statement


upload_2018-9-4_13-2-12.png


Homework Equations


upload_2018-9-4_13-1-2.png

upload_2018-9-4_13-1-36.png


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

  • upload_2018-9-4_13-1-2.png
    upload_2018-9-4_13-1-2.png
    1 KB · Views: 660
  • upload_2018-9-4_13-1-36.png
    upload_2018-9-4_13-1-36.png
    1.1 KB · Views: 639
  • upload_2018-9-4_13-2-12.png
    upload_2018-9-4_13-2-12.png
    28.2 KB · Views: 614
Physics news on Phys.org
(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}]
 
I multiplied the values first without the error limit. Got 19.38. rounded it off to 2 significant figures since the given data has 2 significant figures. So = 19. For error I used the above formula. It comes out about 1.48. Now my question is. Should I write the answer as 19±1.5 (rounding 1.48 to 2 significant figures) OR should I write it as 19±1. So in short, should the error have same number of significant figures as the mean value or should it have the same number of decimal places as...
Thread 'A cylinder connected to a hanging mass'
Let's declare that for the cylinder, mass = M = 10 kg Radius = R = 4 m For the wall and the floor, Friction coeff = ##\mu## = 0.5 For the hanging mass, mass = m = 11 kg First, we divide the force according to their respective plane (x and y thing, correct me if I'm wrong) and according to which, cylinder or the hanging mass, they're working on. Force on the hanging mass $$mg - T = ma$$ Force(Cylinder) on y $$N_f + f_w - Mg = 0$$ Force(Cylinder) on x $$T + f_f - N_w = Ma$$ There's also...
Back
Top