• Support PF! Buy your school textbooks, materials and every day products Here!

Using Mathematica to solve an ODE

  • #1
132
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

Answers and Replies

  • #2
phyzguy
Science Advisor
4,405
1,385
(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}]
 

Related Threads on Using Mathematica to solve an ODE

  • Last Post
Replies
1
Views
1K
Replies
2
Views
555
Replies
16
Views
2K
Replies
9
Views
941
  • Last Post
Replies
2
Views
320
  • Last Post
Replies
5
Views
5K
  • Last Post
Replies
1
Views
712
Replies
1
Views
816
Replies
1
Views
2K
  • Last Post
Replies
1
Views
1K
Top