Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

ejercicios EDO lineales orden 2 - soluciones

May 6, 2020

Ejercicio 1. Resolver:
a
y00 − 2y0 + y = x2

[2]: from sympy import *


from sympy.abc import x # x is the independent variable
f = Function("f")(x) # f is a function of x
from sympy.abc import x
f = Function('f')
dsolve(Derivative(f(x), x, x) -2*Derivative(f(x), x)+f(x)-x**2, f(x))
[2]:
f ( x ) = x2 + 4x + (C1 + C2 x ) e x + 6

b
y00 + 4y0 = 2 sin(3x )

[5]: dsolve(Derivative(f(x), x, x) +4*Derivative(f(x), x)-2*sin(3*x), f(x))


[5]: 2 sin (3x ) 8 cos (3x )
f ( x ) = C1 + C2 e−4x − −
25 75
c
y00 + 10y0 + 25y = 14e−5x

[7]: dsolve(Derivative(f(x), x, x) +10*Derivative(f(x), x)+25*f(x)-14*E**(-5*x), f(x))


[7]:
f ( x ) = C1 + C2 x + 7x2 e−5x


d
y00 − 2y0 + 2y = 2xe x

[8]: dsolve(Derivative(f(x), x, x) -2*Derivative(f(x), x)+2*f(x)-2*x*E**x, f(x))


[8]:
f ( x ) = (C1 sin ( x ) + C2 cos ( x ) + 2x ) e x

1
e
y00 − 2y0 = 3

[9]: dsolve(Derivative(f(x), x, x) -2*Derivative(f(x), x)-3, f(x))


[9]: 3x
f ( x ) = C1 + C2 e2x −
2

f
y00 + y0 = e− x cos x

[12]: dsolve(Derivative(f(x), x, x) +f(x)-E**(-x)*2*cos(x), f(x))


[12]: 
4e− x
 
2e− x

f (x) = C1 − sin ( x ) + C2 + cos ( x )
5 5

g
 y00 − 3y0 + 2y = cos(2x )

y (0) = 0
 y 0 (0) = 0

[23]: dsolve(Derivative(f(x), x, x) -3*Derivative(f(x), x)+2*f(x)-cos(2*x),␣


,→f(x),ics={f(0): 0, f(x).diff(x).subs(x, 0): 0})

[23]: e2x ex 3 sin (2x ) cos (2x )


f (x) = − − −
4 5 20 20

h
 y00 + y0 = − x

y (0) = 1
 y 0 (0) = 0

[3]: dsolve(Derivative(f(x), x, x) +Derivative(f(x), x)+x, f(x),ics={f(0): 1, f(x).


,→diff(x).subs(x, 0): 0})

[3]: x2
f (x) = − + x + e− x
2
[ ]:

You might also like