0
|
3210 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
GROUPS:

# Solving two second order ordinary differential equations

Posted 9 years ago
 I have two differential equations I'd like to solve and plot. Following documentation, I tried to implement DSolve like this:  DSolve[y''[t]==w^2*y[t]-2w*x'[t],y[t],t]  and am not getting a useful result. My question is if DSolve is the correct function to use. Should I use DSolve, or, perhaps, NDSeries?' P.S. the other equation is DSolve[x''[t]==w^2*x[t]+2w*y'[t],x[t],t] 
4 Replies
Sort By:
Posted 9 years ago
 You need to have both equations in a single DSolve function--otherwise there is no way for DSolve to know that there are two simultaneous equations. Also note that your wx'[t] should be w x'[t]: i.e., a space between the w and the x. Similarly for the wy'[t].With that said, here is the form for DSolve that you want to use for these two simultaneous differential equations in x[t] and y[t]: DSolve[ {y''[t] == w^2 y[t] - 2 w x'[t], x''[t] == w^2 x[t] + 2 w y'[t]}, {y[t], x[t]}, t] This gives a result in terms of unknown integration constants C, C, C, and C. If you have initial conditions you can include them in the first argument list of the DSolve and the integration constants will be determined in the soluttion.
Posted 9 years ago
 Thank you, this is very helpful. I do have initial conditions, so I have switched to NDSolve. My code is in the screenshot. What is the problem with the way I have input the initial conditions? Posted 9 years ago
 As an update, when I input the initial conditions like 'x == x0' I get 'True', even having cleared x.
Posted 9 years ago
 yes, you need to use the == (double equal sign) instead of assignment make sure you use the Clear at the beginning of your program so you don't "memorize" your mistakes you call NDSolve twice but you should ca;ll it only once and solve for x and y simultaneously 