Using Mathematica to solve an ODE

  • #1
Ashley1nOnly
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: 513
  • upload_2018-9-4_13-1-36.png
    upload_2018-9-4_13-1-36.png
    2 KB · Views: 512
  • upload_2018-9-4_13-2-12.png
    upload_2018-9-4_13-2-12.png
    52.8 KB · Views: 500

Answers and Replies

  • #2
phyzguy
Science Advisor
5,026
2,025
(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}]
 

Suggested for: Using Mathematica to solve an ODE

  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
2
Views
602
Replies
9
Views
1K
Replies
2
Views
1K
Replies
16
Views
2K
  • Last Post
Replies
5
Views
5K
  • Last Post
Replies
1
Views
1K
Replies
1
Views
1K
  • Last Post
Replies
1
Views
1K
Replies
1
Views
4K
Top