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

  • upload_2018-9-4_13-1-2.png
    upload_2018-9-4_13-1-2.png
    1.7 KB · Views: 457
  • upload_2018-9-4_13-1-36.png
    upload_2018-9-4_13-1-36.png
    2 KB · Views: 459
  • upload_2018-9-4_13-2-12.png
    upload_2018-9-4_13-2-12.png
    52.8 KB · Views: 448

Answers and Replies

  • #2
phyzguy
Science Advisor
4,779
1,733
(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
2K
Replies
16
Views
2K
Replies
2
Views
743
Replies
9
Views
1K
  • Last Post
Replies
2
Views
399
  • Last Post
Replies
1
Views
807
  • Last Post
Replies
5
Views
5K
Replies
1
Views
877
Replies
1
Views
2K
  • Last Post
Replies
1
Views
1K
Top