Diferencia entre revisiones de «Comando ResuelveEDO»
De GeoGebra Manual
Línea 1: | Línea 1: | ||
<noinclude>{{Manual Page|version=4.0}}</noinclude>{{ Comandos Específicos CAS (Cálculo Avanzado)|cas=true|function|ResuelveEDO}} | <noinclude>{{Manual Page|version=4.0}}</noinclude>{{ Comandos Específicos CAS (Cálculo Avanzado)|cas=true|function|ResuelveEDO}} | ||
==Fuera de la Vista CAS== | ==Fuera de la Vista CAS== | ||
− | ;ResuelveEDO[ <f(x,y)>, <x Inicial>, <y Inicial>, <x Final>, <Paso> ]:Resuelve numéricamente | + | ;ResuelveEDO[ <f(x,y)>, <x Inicial>, <y Inicial>, <x Final>, <Paso> ]:Resuelve numéricamente, presentando el resultado como un lugar geométrico, toda ecuación de primer orden - es decir, toda '''EDO''' ('''''E'''''cuación '''''D'''''iferencial '''''O'''''rdinaria abreviada [http://es.wikipedia.org/wiki/Ecuaci%C3%B3n_diferencial_ordinaria "EDO" en Español ])-.<br>Comienza la resolución de <math>\frac{dy}{dx}=f(x,y)</math> numéricamente dado el punto inicial y el final además del ''paso'' para ''x''.<br> |
{{Example|1=<br>Resuelve ecuaciones como '''\begin{equation}\frac{dy}{dx}=f(x,y) \end{equation}''' dados el punto inicial, el final y el paso para ''x''. Siendo '''''A''''' el punto inicial, para resolver '''\begin{equation} \frac{dy}{dx}=-xy \end{equation}''' se anota '''ResuelveEDO[-x*y, x(A), y(A), 5, 0.1]'''. | {{Example|1=<br>Resuelve ecuaciones como '''\begin{equation}\frac{dy}{dx}=f(x,y) \end{equation}''' dados el punto inicial, el final y el paso para ''x''. Siendo '''''A''''' el punto inicial, para resolver '''\begin{equation} \frac{dy}{dx}=-xy \end{equation}''' se anota '''ResuelveEDO[-x*y, x(A), y(A), 5, 0.1]'''. | ||
}} | }} | ||
{{Note|1 =Considerar lo que permiten los siguientes comandos... | {{Note|1 =Considerar lo que permiten los siguientes comandos... | ||
− | * [[Comando Longitud|Longitud]][ <Lugar Geométrico> ] para averiguar cuántos puntos componen un lugar geométrico. | + | *[[Comando Longitud|Longitud]][ <Lugar Geométrico> ] para averiguar cuántos puntos componen un lugar geométrico. |
− | * [[Comando Primero|Primero]][ <Lugar Geométrico>, <Número> ] para extraer los puntos como una lista, como en '''Primero'''[lug1, Longitud[lug1]] | + | *[[Comando Primero|Primero]][ <Lugar Geométrico>, <Número> ] para extraer los puntos como una lista, como en '''Primero'''[lug1, Longitud[lug1]] |
}} | }} | ||
{{Hint|1=Para la solución "inversa", basta con anotar un valor negativo para ''x Final'', como en | {{Hint|1=Para la solución "inversa", basta con anotar un valor negativo para ''x Final'', como en | ||
* '''ResuelveEDO'''[-x*y, x(A), y(A), -5, 0.1]}} | * '''ResuelveEDO'''[-x*y, x(A), y(A), -5, 0.1]}} | ||
;ResuelveEDO[ f(x,y)>, <g(x,y)>, <x Inicial>, <y Inicial>, <t Final>, <Paso> ]:Dados el valor para el punto inicial, el máximo valor del parámetro interno ''t'' y el del paso para ''t'', resuelve la EDO de primer orden \begin{equation} \frac{dy}{dx}=\frac{f(x,y)}{g(x,y)} \end{equation} | ;ResuelveEDO[ f(x,y)>, <g(x,y)>, <x Inicial>, <y Inicial>, <t Final>, <Paso> ]:Dados el valor para el punto inicial, el máximo valor del parámetro interno ''t'' y el del paso para ''t'', resuelve la EDO de primer orden \begin{equation} \frac{dy}{dx}=\frac{f(x,y)}{g(x,y)} \end{equation} | ||
+ | |||
+ | nd may work where the first one fails eg when the solution curve has vertical points. | ||
+ | :For example, to solve <math>\frac{dy}{dx}=- \frac{x}{y} </math> using ''A'' as a starting point, enter SolveODE[-x, y, x(A), y(A), 5, 0.1]. | ||
+ | :{{note| 1=To find the "reverse" solution, just enter a negative value for ''End t'', eg 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 <math>y''+b(x)y'+c(x)y=f(x)</math>. | ||
+ | :{{note| 1=Always returns the result as locus. The algorithms are currently based on Runge-Kutta numeric methods.}} | ||
+ | {{Note|1= See also [[SlopeField Command|SlopeField command]]}} | ||
+ | ;SolveODE[ <f(x, y)> ] | ||
+ | :Attempts to find the exact solution of the first order ODE <math>\frac{dy}{dx}(x)=f(x, y(x))</math>. | ||
+ | :{{example| 1=<div><code><nowiki>SolveODE[y / x]</nowiki></code> yields ''f(x) = c<sub>1</sub> x''.</div>}} | ||
+ | ;SolveODE[ <f(x, y)>, <Point A on f> ] | ||
+ | :Attempts to find the exact solution of the first order ODE <math>\frac{dy}{dx}(x)=f(x, y(x))</math> and use the solution which goes through A. | ||
+ | :{{example| 1=<div><code><nowiki>SolveODE[y / x,(1,2)]</nowiki></code> yields ''f(x) = 2 x''.</div>}} | ||
+ | ==CAS Syntax== | ||
+ | Following two syntaxes work only in [[CAS View]]. | ||
+ | ;SolveODE[ <Differential Equation> ] | ||
+ | :Attempts to find the exact solution of the first or second order ODE. For first and second derivative of y you can use <nowiki>y'</nowiki> and <nowiki>y''</nowiki>. | ||
+ | :{{example| 1=<div><code><nowiki>SolveODE[y'=y / x]</nowiki></code> yields ''f(x) = c<sub>1</sub> x''.</div>}} | ||
+ | |||
+ | ;SolveODE[ <f(x, y)>, <Point(s) L on f> ] | ||
+ | :Attempts to find the exact solution of the first or second order order ODE <math>\frac{dy}{dx}(x)=f(x, y(x))</math> and goes through L (which is a point or list of points) | ||
+ | :{{example| 1=<div><code><nowiki>SolveODE[y'=y / x,(1,2)]</nowiki></code> yields ''y = 2 x''.</div>}} | ||
+ | ;SolveODE[ <f(x, y)>, <Point(s) L on f>, <Point(s) L' on f'> ] | ||
+ | :Attempts to find the exact solution of the first or second order ODE <math>\frac{dy}{dx}(x)=f(x, y(x))</math> and goes through L (which is a point or list of points) and f' goes through L' (which is a point or list of points) | ||
+ | :{{example| 1=<div><code><nowiki>SolveODE[y'=y / x,(1,2)]</nowiki></code> yields ''y = 2 x''.</div>}} | ||
+ | ;SolveODE[ <f(v, w)>, <Dependent Variable v>, <Independent Variable w> ] | ||
+ | :Attempts to find the exact solution of the first order ODE <math>\frac{dv}{dw}(w)=f(w, v(w))</math>. | ||
+ | :{{example| 1=<div><code><nowiki>SolveODE[v'=v / w, w, v]</nowiki></code> yields ''v = c<sub>1</sub> w''.</div>}} | ||
+ | ;SolveODE[ <f(v, w)>, <Dependent Variable v>, <Independent Variable w>, <Point(s) L on f> ] | ||
+ | Combines parameters of second and fourth syntax. | ||
+ | ;SolveODE[ <f(v, w)>, <Dependent Variable v>, <Independent Variable w>, <Point(s) L on f>, <Point(s) L' on f'> ] | ||
+ | Combines parameters of third and fourth syntax. | ||
+ | {{Note|For compatibility with input bar, if the first parameter is just an expression without <nowiki>y'</nowiki> or <nowiki>y''</nowiki>, it is supposd to be right hand side of ODE with left hand side y'.}} | ||
+ | |||
+ | |||
{{Warning|1=Esta versión del comando puede operar adecuadamente cuando la primera falla. <br>Como cuando la curva de solución tiene puntos verticales.<br>Siendo '''''A''''' el punto inicial, para resolver '''''\begin{equation}\frac{dy}{dx}=- \frac{x}{y} \end{equation}''''' se anota '''ResuelveEDO[-x, y, x(A), y(A), 5, 0.1]'''}} | {{Warning|1=Esta versión del comando puede operar adecuadamente cuando la primera falla. <br>Como cuando la curva de solución tiene puntos verticales.<br>Siendo '''''A''''' el punto inicial, para resolver '''''\begin{equation}\frac{dy}{dx}=- \frac{x}{y} \end{equation}''''' se anota '''ResuelveEDO[-x, y, x(A), y(A), 5, 0.1]'''}} | ||
{{Hint|1=Para la solución "inversa", basta con anotar un valor negativo para ''x Final'', como en | {{Hint|1=Para la solución "inversa", basta con anotar un valor negativo para ''x Final'', como en |
Revisión del 02:23 1 nov 2012
ResuelveEDO
Categorías de Comandos (todos)
Fuera de la Vista CAS
- ResuelveEDO[ <f(x,y)>, <x Inicial>, <y Inicial>, <x Final>, <Paso> ]
- Resuelve numéricamente, presentando el resultado como un lugar geométrico, toda ecuación de primer orden - es decir, toda EDO (Ecuación Diferencial Ordinaria abreviada "EDO" en Español )-.
Comienza la resolución de \frac{dy}{dx}=f(x,y) numéricamente dado el punto inicial y el final además del paso para x.
Ejemplo:
Resuelve ecuaciones como \begin{equation}\frac{dy}{dx}=f(x,y) \end{equation} dados el punto inicial, el final y el paso para x. Siendo A el punto inicial, para resolver \begin{equation} \frac{dy}{dx}=-xy \end{equation} se anota ResuelveEDO[-x*y, x(A), y(A), 5, 0.1].
Resuelve ecuaciones como \begin{equation}\frac{dy}{dx}=f(x,y) \end{equation} dados el punto inicial, el final y el paso para x. Siendo A el punto inicial, para resolver \begin{equation} \frac{dy}{dx}=-xy \end{equation} se anota ResuelveEDO[-x*y, x(A), y(A), 5, 0.1].
Nota: Considerar lo que permiten los siguientes comandos...
Aviso: Para la solución "inversa", basta con anotar un valor negativo para x Final, como en
- ResuelveEDO[-x*y, x(A), y(A), -5, 0.1]
- ResuelveEDO[ f(x,y)>, <g(x,y)>, <x Inicial>, <y Inicial>, <t Final>, <Paso> ]
- Dados el valor para el punto inicial, el máximo valor del parámetro interno t y el del paso para t, resuelve la EDO de primer orden \begin{equation} \frac{dy}{dx}=\frac{f(x,y)}{g(x,y)} \end{equation}
nd may work where the first one fails eg when the solution curve has vertical points.
- For example, to solve \frac{dy}{dx}=- \frac{x}{y} using A as a starting point, enter SolveODE[-x, y, x(A), y(A), 5, 0.1].
- Nota: To find the "reverse" solution, just enter a negative value for End t, eg 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 y''+b(x)y'+c(x)y=f(x).
- Nota: Always returns the result as locus. The algorithms are currently based on Runge-Kutta numeric methods.
Nota: See also SlopeField command
- SolveODE[ <f(x, y)> ]
- Attempts to find the exact solution of the first order ODE \frac{dy}{dx}(x)=f(x, y(x)).
- Ejemplo:
SolveODE[y / x]
yields f(x) = c1 x. - SolveODE[ <f(x, y)>, <Point A on f> ]
- Attempts to find the exact solution of the first order ODE \frac{dy}{dx}(x)=f(x, y(x)) and use the solution which goes through A.
- Ejemplo:
SolveODE[y / x,(1,2)]
yields f(x) = 2 x.
CAS Syntax
Following two syntaxes work only in CAS View.
- SolveODE[ <Differential Equation> ]
- Attempts to find the exact solution of the first or second order ODE. For first and second derivative of y you can use y' and y''.
- Ejemplo:
SolveODE[y'=y / x]
yields f(x) = c1 x.
- SolveODE[ <f(x, y)>, <Point(s) L on f> ]
- Attempts to find the exact solution of the first or second order order ODE \frac{dy}{dx}(x)=f(x, y(x)) and goes through L (which is a point or list of points)
- Ejemplo:
SolveODE[y'=y / x,(1,2)]
yields y = 2 x. - SolveODE[ <f(x, y)>, <Point(s) L on f>, <Point(s) L' on f'> ]
- Attempts to find the exact solution of the first or second order ODE \frac{dy}{dx}(x)=f(x, y(x)) and goes through L (which is a point or list of points) and f' goes through L' (which is a point or list of points)
- Ejemplo:
SolveODE[y'=y / x,(1,2)]
yields y = 2 x. - SolveODE[ <f(v, w)>, <Dependent Variable v>, <Independent Variable w> ]
- Attempts to find the exact solution of the first order ODE \frac{dv}{dw}(w)=f(w, v(w)).
- Ejemplo:
SolveODE[v'=v / w, w, v]
yields v = c1 w. - SolveODE[ <f(v, w)>, <Dependent Variable v>, <Independent Variable w>, <Point(s) L on f> ]
Combines parameters of second and fourth syntax.
- SolveODE[ <f(v, w)>, <Dependent Variable v>, <Independent Variable w>, <Point(s) L on f>, <Point(s) L' on f'> ]
Combines parameters of third and fourth syntax.
Nota: For compatibility with input bar, if the first parameter is just an expression without y' or y'', it is supposd to be right hand side of ODE with left hand side y'.
Alerta: | Esta versión del comando puede operar adecuadamente cuando la primera falla. Como cuando la curva de solución tiene puntos verticales. Siendo A el punto inicial, para resolver \begin{equation}\frac{dy}{dx}=- \frac{x}{y} \end{equation} se anota ResuelveEDO[-x, y, x(A), y(A), 5, 0.1] |
Aviso: Para la solución "inversa", basta con anotar un valor negativo para x Final, como en
ResuelveEDO[y, x(A), y(A), -5, 0.1]
- ResuelveEDO[ <b(x)>, <c(x)>, <f(x)>, <x Inicial>, <y Inicial>, <y' Inicial>, <x Final>, <Paso> ]
- Resuelve la EDO de segundo orden \begin{equation}y+b(x)y'+c(x)y=f(x)\end{equation}.
Ejemplo:
ResuelveEDO[cos(x), sin(x), x(A) sin(x)² + y(A) cos(x)², -3.14159, -1, -1, -6.28319, 0.1]
ResuelveEDO[cos(x), sin(x), x(A) sin(x)² + y(A) cos(x)², -3.14159, -1, -1, -6.28319, 0.1]
Nota:
- El resultado siempre es presentado como lugar geométrico que, por omisión es un objeto auxiliar por lo que no aparece expuesto en la Vista Algebraica.
- El algoritmo está basado en el método numérico de Runge-Kutta.
- Longitud[ <LugarGeométrico> ] permite establecer cuántos puntos componen el lugar geométrico computado
- Primero[ <lugar geométrico>, <Número> ], extrae tales puntos como una lista.
Por ejemplo, Primero[ lug1, Longitud[ lug1]] - Ver también el comando CampoDeDirecciones
En Vista CAS
Cualquiera de estas variantes de sintaxis opera exclusivamente en la Vista Algebraica CAS y como medio específico del Cálculo Formal.
- ResuelveEDO[<f(x,y)>]
- Procura encontrar la solución exacta para la EDO de primer orden
\begin{equation} \frac{dy}{dx}=f(x,y) \end{equation}
- ResuelveEDO[<f( variable1, variable2)>, <variable1 dependiente>, <variable2 independiente> ]
- Opera de modo análogo a la variante previa excepto que la función f puede serlo respecto de variables diferentes a x o y como \frac{dv}{dw}(w)=f(w, v(w)) siendo v la variable dependiente y w la independiente.
- Ejemplo:
ResuelveEDO[y / x, y, x]
da y = c1 x.