Difference between revisions of "SolveODE Command"
Line 16: | Line 16: | ||
:Solves first order ODE | :Solves first order ODE | ||
\begin{equation} \frac{dy}{dx}=\frac{f(x,y)}{g(x,y)} \end{equation} | \begin{equation} \frac{dy}{dx}=\frac{f(x,y)}{g(x,y)} \end{equation} | ||
− | given start point, maximal value of ''t'' and step for ''t''. This version of the command may work where the first one fails eg when the solution curve has vertical points. | + | given start point, maximal value of an internal parameter ''t'' and step for ''t''. This version of the command may work where the first one fails eg when the solution curve has vertical points. |
For example to solve | For example to solve | ||
\begin{equation}\frac{dy}{dx}=- \frac{x}{y} \end{equation} | \begin{equation}\frac{dy}{dx}=- \frac{x}{y} \end{equation} |
Revision as of 06:11, 9 August 2011
- SolveODE[ <f'(x,y)>, <Start x>, <Start y>, <End x>, <Step> ]
- Solves first order ordinary differential equations (ODE)
\begin{equation}\frac{dy}{dx}=f'(x,y) \end{equation} numerically given start point and end & step for x. For example to solve \begin{equation} \frac{dy}{dx}=-xy \end{equation} using A as a starting point, enter SolveOde[-x*y, x(A), y(A), 5, 0.1]
First[ loc1, Length[ loc1 ] ]
- SolveODE[ <f(x,y)>, <g(x,y)>, <Start x>, <Start y>, <End t>, <Step> ]
- Solves first order ODE
\begin{equation} \frac{dy}{dx}=\frac{f(x,y)}{g(x,y)} \end{equation} given start point, maximal value of an internal parameter t and step for t. This version of the command may work where the first one fails eg when the solution curve has vertical points. For example to solve \begin{equation}\frac{dy}{dx}=- \frac{x}{y} \end{equation} using A as a starting point, enter SolveOde[-x, y, x(A), y(A), 5, 0.1]
- SolveODE[ <b(x)>, <c(x)>, <f(x)>, <Start x>, <Start y>, <Start y'>, <End x>, <Step>]
- Solves second order ODE
\begin{equation}y+b(x)y'+c(x)y=f(x)\end{equation}
CAS Syntax
Following two syntaxes work only in CAS View and only with Maxima as CAS.
- SolveODE(<f(x,y)>)
- Attempts to find the exact solution of the first order ODE
\begin{equation} \frac{dy}{dx}=f(x,y) \end{equation}
- SolveODE(<f( var1, var2)>, <var1>, <var2>)
- As above, but function f can be in variables other than x & y