You are on page 1of 15

Ecuaciones Diferenciales ¶

Uso de las Tics Unidad 2¶

Pablo Gutierrez Luna¶

Wronskiano ¶
1. Aplique el Wronskiano para demostrar que las soluciones $\sin x$ y $\cos x$ de la ecuacion diferencial: $y''+y=0$ son
linealmente independientes.
Para utilizar el Wronskiano se calcula el determinante de la matrix $W=\left(\begin{array}{cc} \sin x & \cos x\\ \cos x & -\sin x
\end{array}\right)$

In [1]:

w=matrix([[sin(x),cos(x)],[cos(x),-sin(x)]]);w

Out[1]:

[ sin(x) cos(x)]
[ cos(x) -sin(x)]

In [3]:

w.det()

Out[3]:

-cos(x)^2 - sin(x)^2

In [5]:
w1=det(w)
w1=w1.simplify_trig();w1

Out[5]:

-1

1. determina si el conjunto de funciones es linealmente indepéndiente en el intervalo $\left(-\infty,\infty\right)$


$f_{1}\left(x\right)=x, f_{2}\left(x\right)=x^{2}, f_{3}\left(x\right)=4x-3x^{2}$
$w\left(f_{1},\,,f_{2},\,f_{3}\right)=\left|\begin{array}{ccc} x\,\, & x^{2}\, & \,\,4x-3x^{2}\\ 1\,\, & 2x & 4-6x\\ 0\,\, & 2 & -6
\end{array}\right|$

In [10]:

w2=matrix([[x,x^2,4*(x)-3*(x^2)],[1,2*(x),4-6*(x)],[0,2,-6]]);w2

Out[10]:

[ x x^2 -3*x^2 + 4*x]


[ 1 2*x -6*x + 4]
[ 0 2 -6]

In [12]:

w2.det()
Out[12]:

In [13]:

w2=det(w2)
w2=w2.simplify_trig();w2

Out[13]:

1 Soliucion de Wronskiano $W\left(e^{2x},xe^{2x}\right)=\left|\begin{array}{cc} e^{2x} & xe^{2x}\\ 2e^{2x} & e^{2x}+2xe^{2x}


\end{array}\right|$

In [14]:

w3=matrix([[exp(2*x),x*exp(2*x)],[2*exp(2*x),exp(2*x)+2*exp(2*x)]]);w3

Out[14]:

[ e^(2*x) x*e^(2*x)]
[2*e^(2*x) 3*e^(2*x)]

In [15]:
w3.det()

Out[15]:

-2*x*e^(4*x) + 3*e^(4*x)

In [16]:

w3=det(w3)
w3=w3.simplify_trig();w3

Out[16]:

-(2*x - 3)*e^(4*x)

ED lineal homogenea con coeficientes constantes ¶


1. Resuelva la siguiente ecuacion diferencial $4y''+y'=0$

In [19]:

x=var('x')
y=function('y')(x)
ED1=4*diff(y,x,2)+diff(y,x)==0
ED1.show()
desolve(ED1,y).show()
desolve(ED1,y,show_method=true)

Out[19]:

[_K2*e^(-1/4*x) + _K1, 'constcoeff']

In [ ]:

2.Encuentre la solucion general de la ecuacion de orden superior dada $y'''-4y''-5y'=0$

In [22]:

x=var('x')
y=function('y')(x)
ED2=diff(y,x,3)-4*diff(y,x,2)-5*diff(y,x)==0
ED2.show()
desolve(ED2,y,contrib_ode=true).show()
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
<ipython-input-22-487e7b6aaa48> in <module>()
3 ED2=diff(y,x,Integer(3))-Integer(4)*diff(y,x,Integer(2))-Integer(5)*diff(y,x)==Integer(0)
4 ED2.show()
----> 5 desolve(ED2,y,contrib_ode=true).show()

/opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/calculus/desolvers.py in desolve(de, dvar, ics, ivar, show_method,


contrib_ode)
475 soln = P(cmd)
476 if str(soln).strip() == 'false':
--> 477 raise NotImplementedError("Maxima was unable to solve this ODE.")
478 else:
479 raise NotImplementedError("Maxima was unable to solve this ODE. Consider to set option contrib_ode to True.")

NotImplementedError: Maxima was unable to solve this ODE.

In [ ]:

3.Resuelva el problema con valores iniciales $4y''-4y'-3y=0$

In [24]:

x=var('x')
y=function('y')(x)
ED3=4*diff(y,x,2)-4*diff(y,x)-3*y==0
ED3.show()
desolve(ED3,y).show()
desolve(ED3,y,show_method=true)
Out[24]:

[_K1*e^(3/2*x) + _K2*e^(-1/2*x), 'constcoeff']

ED (Coeficientes indeterminados) ¶

Resuelva la ecuacion diferencial dada usando coeficientes indeterminados: $y''+3y'+2y=6$

In [2]:

x=var('x')
y=function('y')(x)
ED4=diff(y,x,2)+3*diff(y,x)+2*y==6
ED4.show()
desolve(ED4,y).show()
desolve(ED4,y,show_method=true)

Out[2]:

[_K1*e^(-x) + _K2*e^(-2*x) + 3, 'variationofparameters']

In [ ]:
Resuelva la ecuacion diferencial dada usando coeficientes indeterminados:$y''-10y'+25y=30x+3$

In [3]:

x=var('x')
y=function('y')(x)
ED5=diff(y,x,2)-10*diff(y,x)+25*y==30*x+3
ED5.show()
desolve(ED5,y).show()
desolve(ED5,y,show_method=true)

Out[3]:

[(_K2*x + _K1)*e^(5*x) + 6/5*x + 3/5, 'variationofparameters']

Resuelva la ecuacion diferencial dada usando coeficientes indeterminados: $y''-2y'+5y=e^{x}\cos2x$

In [5]:

x=var('x')
y=function('y')(x)
ED6=diff(y,x,2)-2*diff(y,x)+5*y==exp(x)*cos(2*x)
ED6.show()
desolve(ED6,y).show()
desolve(ED6,y,show_method=true)
Out[5]:

[1/4*x*e^x*sin(2*x) + (_K2*cos(2*x) + _K1*sin(2*x))*e^x + 1/8*cos(2*x)*e^x,


'variationofparameters']

Resuelva el problema con valores ineciales dado. $ 5y''+y'=-6x$ $y(0)=0$ $y'(0)=-10$

In [8]:

x=var('x')
y=function('y')(x)
ED7=5*diff(y,x,2)+diff(y,x)==-6*x
ED7.show()
desolve(ED7,y).show()
desolve(ED7,y,ics=[0,0,-10]).show()
desolve(ED7,y,show_method=true)

Out[8]:

[-3*x^2 + _K2*e^(-1/5*x) + _K1 + 30*x - 150, 'variationofparameters']

ED (Variación de parámetros) ¶
Resuelva cada ecuacion diferencial por medio de variacion de parametros: $y''+y=\sec x$

In [9]:

x=var('x')
y=function('y')(x)
ED8=diff(y,x,2)+y==sec(x)
ED8.show()
desolve(ED8,y).show()
desolve(ED8,y,show_method=true)

Out[9]:

[_K2*cos(x) + 1/2*cos(x)*log(1/2*cos(2*x) + 1/2) + _K1*sin(x) + x*sin(x),


'variationofparameters']

Resuelva cada ecuacion diferencial por medio de variacion de parametros: $y''+y=\cos^{2}x$

In [12]:

x=var('x')
y=function('y')(x)
ED9=diff(y,x,2)+y==(cos(x))^2
ED9.show()
desolve(ED9,y).show()
desolve(ED9,y,show_method=true)
Out[12]:

[_K2*cos(x) + _K1*sin(x) - 1/6*cos(2*x) + 1/2, 'variationofparameters']

Resuelva cada ecuacion diferencial mediante variacion de parametros, sujeta a las condiciones iniciales.
$y(0)=1,\,\,\,y'(0)=0$
$2y''+y'-y=x+1$

In [14]:

x=var('x')
y=function('y')(x)
ED10=2*diff(y,x,2)+diff(y,x)-y==x+1
ED10.show()
desolve(ED10,y).show()
desolve(ED10,y,ics=[0,1,0]).show()
desolve(ED10,y,show_method=true)

Out[14]:

[_K1*e^(1/2*x) + _K2*e^(-x) - x - 2, 'variationofparameters']

Ecuación de Cauchy ¶
Resuelva la ecuacion diferencial dada
$x^{2}y''-2y=0$

In [16]:

x=var('x')
y=function('y')(x)
ED11=x^2*diff(y,x,2)-2*y==0
ED11.show()
desolve(ED11,y).show()
desolve(ED11,y,show_method=true)

Out[16]:

[_K2*x^2 - 1/3*_K1/x, 'exact']

Resuelva la ecuacion diferencial dada: $x^{2}y''+xy'+4y=0$

In [18]:

x=var('x')
y=function('y')(x)
ED12=x^2*diff(y,x,2)+x*diff(y,x)+4*y==0
ED12.show()
desolve(ED12,y).show()
desolve(ED12,y,show_method=true)
Out[18]:

[_K2*cos(2*log(x)) + _K1*sin(2*log(x)), 'euler']

examen Op.1 ¶

1. la ecuacion diferencial:
$3x^{2}y''+6xy'+y=0$

In [20]:

x=var('x')
y=function('y')(x)
ED13=3*(x^2)*diff(y,x,2)+6*(x)*diff(y,x)+y==0
ED13.show()
desolve(ED13,y).show()
desolve(ED13,y,show_method=true)

Out[20]:

[(_K2*cos(1/6*sqrt(3)*log(x)) + _K1*sin(1/6*sqrt(3)*log(x)))/sqrt(x), 'euler']


Resuelva ecuacion diferencial dada por coeciente indeterminados:
$y''-2y'+5y=e^{x}\sin x$

In [21]:

x=var('x')
y=function('y')(x)
ED12=diff(y,x,2)-2*diff(y,x)+5*y==exp(x)*sin(x)
ED12.show()
desolve(ED12,y).show()
desolve(ED12,y,show_method=true)

Out[21]:

[(_K2*cos(2*x) + _K1*sin(2*x))*e^x + 1/3*e^x*sin(x), 'variationofparameters']

In [ ]:

You might also like