presentación de powerpoint - usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/practica repaso...
TRANSCRIPT
![Page 1: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/1.jpg)
ECUACIONES DIFERENCIALES
PRÁCTICA
![Page 2: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/2.jpg)
ECUACIONES DIFERENCIALES
Contenido
- EJEMPLOS DE ED Y SOLUCIONES.
- EL COMANDO dsolve. RESOLUCIÓN DE PROBLEMAS DE CONDICIÓN
INICIAL.
- CAMPOS DE DIRECCIONES.
- TRAYECTORIAS ISOCLINAS.
- ED EN VARIABLES SEPARADAS.
![Page 3: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/3.jpg)
COMANDOS PARA LA DERIVACIÓN
» syms x
» diff(f,x)
Halla la función derivada de f respecto a x.
» diff(f,x,n)
Halla la función derivada enésima de f respecto a x.
» Df
Representa simbólicamente la derivada de f.
Para derivadas sucesivas D2, D3, etc.
![Page 4: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/4.jpg)
EJEMPLOS DE ED Y SOLUCIONES
1. Sea la ecuación m y´´ = -m g + k y´
Comprobar que y(t) = A + B exp(k t / m) + m g t / k
es una solución de dicha ED
SOLUCIÓN
1º. Definir simbólicamente y(t).
2º. Sustituir en la ED
![Page 5: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/5.jpg)
» syms t y k m g A B
» y = A + B*exp(k*t/m) + m*g/k*t;
» a=m*diff(y,t,2)-k*diff(y,t)+m*g
a =1/m*B*k^2*exp(k*t/m)-
k*(B*k/m*exp(k*t/m)+m*g/k)+m*g
» simplify(a)
ans =0
![Page 6: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/6.jpg)
2. Comprobar que la función
u(x,t) = exp( -Π2 c2 t / l2 ) sen( Π x / l)
es solución de la ecuación del calor
ut(x,t)= c2 uxx(x,t)
![Page 7: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/7.jpg)
» syms u t c x l
» u='exp(-pi^2*c^2*t/l^2)*sin(pi*x/l)';
» diff(u,t)-c^2*diff(u,x,2)
ans =0
![Page 8: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/8.jpg)
El comando dsolve permite resolver explícitamente algunas ED, incluso sin declarar simbólicas a las variables involucradas.
» dsolve('Dy=1+y^2')
ans =tan(t+C1)
-Resolver la ED y'=1+y^2
» dsolve('Dy=1+y^2','y(0)=1')
ans =tan(t+1/4*pi)
-Obtener la solución local con la CI (0,1)
-Representar dicha solución local
El comando dsolve. Resolución de PCI
![Page 9: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/9.jpg)
» ezplot('tan(t+pi/4)',[-pi/4,pi/4]), hold on, plot(0,1,'*r')
-0.6 -0.4 -0.2 0 0.2 0.4 0.6
0
1
2
3
4
5
6
7
8
9
t
tan(t+π/4)
![Page 10: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/10.jpg)
» dsolve('Dy=-y-2*t')
ans =-2*t+2+exp(-t)*C1
- Resolver la ED y' = - y - 2 t
- Obtener la solución local con la CI (-2,1)
» dsolve('Dy=-y- 2*t','y(-2)=1')
ans =-2*t+2-5*exp(-t)/exp(2)
- Representar dicha solución local
![Page 11: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/11.jpg)
» ezplot('-2*t+2-5*exp(-t)/exp(2)',[-4,3]), hold on, plot (-2,1,'*g')
-4 -3 -2 -1 0 1 2 3
-16
-14
-12
-10
-8
-6
-4
-2
0
2
t
-2 t+2-5 exp(-t)/exp(2)
![Page 12: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/12.jpg)
Algunas ED resolubles no pueden ser resueltas por MATLAB.
Warning: Explicit solution could not be found.
>In C:\MATLABR11\toolbox\symbolic\dsolve.m at line 326
ans = [ empty sym ]
EJEMPLO. y'=-2t-y+cos(y)
» dsolve('Dy=-2*t-y+cos(y)')
![Page 13: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/13.jpg)
Si el comando dsolve no puede obtener explícitamentela solución, entonces el propio dsolve ofrece la solución en la forma implícita.
EJEMPLO. y'=y^2(1-y)
Warning: Explicit solution could not be found; implicit solution returned.
> In C:\MATLABR11\toolbox\symbolic\dsolve.m at line 292
t+1/y-log(y)+log(-1+y)+C1=0
» dsolve('Dy=y^2*(1-y)')
![Page 14: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/14.jpg)
Resolver la ED y''=-y+ cos(2x)
con la CI y(0)=1, y'(0)=0.
y = (1/2*sin(x)+1/6*sin(3*x))*sin(x)+(1/6*cos(3*x)-1/2*cos(x))*cos(x)+4/3*cos(x)
» y=dsolve('D2y=-y+ cos(2*x) ','y(0)=1','Dy(0)=0','x')
» simplify(y)
ans = -2/3*cos(x)^2+4/3*cos(x)+1/3
Notar el efecto del comando simplify
![Page 15: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/15.jpg)
Significado geométrico de y'=f(x,y).
Dada la ED y'=f(x,y), si y(x) es solución y (x0,y0) es un punto de la gráfica de y(x), entonces la pendiente de dicha solución en (x0,y0) es y' (x0) que es igual a f (x0,y0).
Así pues, para conocer la pendiente de la solución que pasa por (x0,y0) no hace falta conocer dicha solución; basta con calcular f (x0,y0).
Si esto se hace con todos los puntos del plano, tendremos las pendientes de las soluciones que pasan por cada punto del plano.
Naturalmente, en la práctica es imposible hacer esto con todos los puntos del plano, pero nada nos impide hacerlo con tantos puntos como queramos, configurando un dibujo que se llama campo de direcciones de la ED.
![Page 16: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/16.jpg)
CAMPOS DE DIRECCIONES
Sea n=1 y sea y'(x)=f(x,y(x)).
Para construir el CAMPO DE DIRECCIONES de la ED, por cada punto (x,y) de una red de puntos de R^2 se dibuja un segmento o vector de pendiente f(x,y).
Para el estudio gráfico de las soluciones de una ED sin haberla resuelto, usaremos un programa en el que intervienen los comandos
meshgrid y quiver,
que permite dibujar el campo de direcciones.
Los vectores a considerar para obtener el campo de direcciones serán (1, y') .
![Page 17: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/17.jpg)
» f=inline('x', 'x','y')
» paso=0.5;iz=-3;der=3;
» [x,y]=meshgrid(iz:paso:der,iz:paso:der)
» [n,m]=size(x)
» dx=ones(n,m)
» z=f(x,y)
» dy=z
» quiver(x,y,dx,dy)
EJEMPLO. Construir el campo de direcciones de la ED y'=x
![Page 18: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/18.jpg)
-3 -2 -1 0 1 2 3 4-4
-3
-2
-1
0
1
2
3
4
![Page 19: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/19.jpg)
Representar además la solución particular que cumple la CI y(0)=0.
» hold on, quiver(x,y,dx,dy)
» dsolve('Dy=x','y(0)=0', 'x')
» ezplot('1/2*x^2',[-2.5,2.5]), hold on, plot(0,0,'*g')
![Page 20: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/20.jpg)
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
0
0.5
1
1.5
2
2.5
3
x
1/2 x2
![Page 21: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/21.jpg)
Ejercicio.
1. Construir el campo de direcciones de
y'=-x/y
2. Representar además la solución particularque cumple la CI
y(1)=1.
![Page 22: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/22.jpg)
0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-0.2
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
![Page 23: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/23.jpg)
0.4 0.6 0.8 1 1.2 1.4 1.6
0
0.2
0.4
0.6
0.8
1
1.2
1.4
x
(-x2+2)1/2
![Page 24: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/24.jpg)
TRAYECTORIAS ISOCLINASDada la ED y'=f(x,y) , se llaman curvas de nivel o isoclinas a las obtenidas al imponer la condición
y'=k
Método de las isoclinas.
Es una variante de las ideas antes descritas. Los puntos del plano por los que pasa una solución con pendiente k, son los puntos de la curva de ecuación f(x,y)=k (isoclina de pendiente k).
Dibujando las distintas isoclinas se obtiene una representación similar a la del campo de direcciones.
Puede tener interés identificar la isoclina para la pendiente 0 pues las soluciones tendrán generalmente un máximo o un mínimo al pasar por esta isoclina.
![Page 25: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/25.jpg)
» [x,y]=meshgrid(0:0.05:3,-2:0.05:2);
» z=x+y.^2;
» isoclinas=contour(x,y,z,20)
Representar el gráfico de contorno (curvas de nivel o isoclinas) de la superficie z = x + y^2
Representar las isoclinas de la ED y' = x + y^2
![Page 26: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/26.jpg)
0 0.5 1 1.5 2 2.5 3-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
![Page 27: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/27.jpg)
Representar las isoclinas de la ED
y' = x^2 + y^2
» [x,y]=meshgrid(-4:0.05:4);
» z=x.^2+y.^2;
» isoclinas=contour(x,y,z,20)
![Page 28: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/28.jpg)
-4 -3 -2 -1 0 1 2 3 4-4
-3
-2
-1
0
1
2
3
4
![Page 29: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/29.jpg)
EJERCICIO.
Representar las isoclinas de la ED
y' = 2x- y
¿Qué tipo de curvas son dichas isoclinas?
Representar las isoclinas correspondientes a k=0, y k=2.
¿Qué particularidad tiene la correspondiente a k=2?
![Page 30: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/30.jpg)
![Page 31: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/31.jpg)
![Page 32: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/32.jpg)
» f=inline('sin(x)+y', ‘x','y')
» paso=0.5;iz=-3;der=3;
» [x,y]=meshgrid(iz:paso:der,iz:paso:der)
» [n,m]=size(x)
» dx=ones(n,m)
» z=f(x,y)
» dy=z
» hold on, contour(x,y,z,20),quiver(x,y,dx,dy)
Construir el campo de direcciones y las curvas de nivel de la ED y'=sin(x)+y
![Page 33: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/33.jpg)
-3 -2 -1 0 1 2 3 4-4
-3
-2
-1
0
1
2
3
4
![Page 34: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/34.jpg)
Ecuaciones en variables separadas
y'=f(x)h(y)
y(x0)=y0dy/h(y)=f(x)dx , si 1/h=g, entonces g(y)dy=f(x)dx
Resolver el siguiente PCI
y' = -2 x y, f(x)=-2x, h(y)=y
y(0)=2
Representar la solución.
Integrando G(y)=F(x)+c (Solución general)
c=G(y0)-F(x0)
G(y)=F(x)+G(y0)-F(x0) (Solución particular)
![Page 35: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/35.jpg)
» syms F G x y c
» f='-2*x'; g='1/y';
» x0=0;y0=2;
» F=int(f); G=int(g);
» sol=solve(G-F-c,y) solución general
» cc=solve(subs(sol,x0,'x')-y0,c);
» y=subs(sol,cc,'c') solución particular
» ezplot(y,[-2,2]), hold on, plot (0,2,'+r')
![Page 36: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/36.jpg)
y =exp(-x^2+log(2)) solución particular
sol =exp(-x^2+2*c) solución general
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
x
exp(-x2+log(2))
![Page 37: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/37.jpg)
Resolver el siguiente PCI
y' = -2 x y
y(0) = 2
usando el comando dsolve.
» dsolve('Dy=-2*x*y','y(0)=2','x')
y =2*exp(-x^2)
![Page 38: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/38.jpg)
Resolver el PCI
y'=sen(x)(y-1)
y(0)=2» syms F G x y X Y
» f='sin(x)'
» g='1/(y-1)'
» F=int(f,x,0,X)
» G=int(g,y,2,Y)
![Page 39: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/39.jpg)
» sol=solve(G-F,Y)
solución particular
» F =-cos(X)+1
» G =log(Y-1)
» sol =exp(-cos(X)+1)+1
![Page 40: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/40.jpg)
Resolver ycos(x)dx-(1+y^2)dy=0, y(0)=1.
Despejando y'=ycos(x)/(1+y^2)
» y= dsolve('Dy=y*cos(x)/(1+y^2) ', 'x')
y =-i*(-lambertw(exp(2*sin(x)+2*C1)))^(1/2)
Teniendo en cuenta que Lambertw(x)=w cumple que w*exp(w)=x,
lo que se obtiene es
y^2*exp(y^2)=K*exp(2*sin(x))
![Page 41: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/41.jpg)
Resolver ycos(x)dx-(1+y^2)dy=0, y(0)=1.Separando las variables
» solve('int(cos(x),x)-int((1+y^2)/y,y)')
» ans =asin(1/2*y^2+log(y)),
es decir, sin(x)=log(y)+1/2*y^2+c (solución general)
» c=simple(sym('solve(subs(x=0,y=1,sin(x)=
log(y)+1/2*y^2+ c),c)'))
» c =-1/2, es decir, la solución particular es
sen(x)=log(y)+1/2(y^2-1)
![Page 42: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/42.jpg)
Aplicar herramientas del MATLAB para resolver los siguientes ejercicios.
0)0(,')1()2/1)0(,)1()1()
)3()())(')
0)1(4)0sin)
22
22
2
2
==+=+=+
+=−
−+=
=++=+
yeyyefydxydyxe
dxyxdyyxdyxyxyc
dyxdxxyb(x)yy'a
yx
![Page 43: Presentación de PowerPoint - Usuarios de prof.usb.veprof.usb.ve/rescalante/cursos/Practica repaso de ED (CO...TRAYECTORIAS ISOCLINAS Dada la ED y'=f(x,y) , se llaman curvas de nivel](https://reader033.vdocumento.com/reader033/viewer/2022051802/5af4eaff7f8b9ae9488cc311/html5/thumbnails/43.jpg)
Nota. MATLAB se vale de una colección de “funciones básicas elementales” más amplia que la nuestra, con la cual nos puede dar una mayor cantidad de respuestas en forma cerrada. Una de estas funciones es w(z)=Lambertw(z) definida implícitamente por
Lambertw(z)*exp(Lambertw(z))=z
La definición de cualquier función especial MatLab puede serconsultada invocando en la línea de comandos help+nombre de función, por ejemplo
>>help lambertwLAMBERTW Lambert's W function.W = LAMBERTW(X) is the solution to w*exp(w) = x.W = LAMBERTW(K,X) is the K-th branch of this multi-valued function.Reference: Robert M. Corless, G. H. Gonnet, D. E. G. Hare,D. J. Jeffrey, and D. E. Knuth, "On the Lambert W Function",Advances in Computational Mathematics, volume 5, 1996, pp. 329-359.Also available from:http://pineapple.apmaths.uwo.ca/~rmc/papers/LambertW/index.html
Overloaded methodshelp sym/lambertw.m