Ecuaciones diferenciales
Ecuaciones diferenciales lineales con coeficientes constantes
Trabajando con el lenguaje simbólico, Matlab tiene la función
3y''-2y'-8y=03y''-2y'-8y=0
y'''-3y''+3y'-y=0, y(0)=1, y'(0)=2, y''(0)=3
y'''-5y''=(7t-4)e2t
y''-y'=5sent
y''+4y=7cos(2t)
4y''+8y'=2tsent
yIV-2y'''+2y''-2y'+y=5et
y''+y=cos2(2t)+sen2(t/2)
>> syms y; >> y=dsolve('3*D2y-2*Dy-8*y=0') y = C4*exp(2*t) + C3*exp(-(4*t)/3)
La función
>> y=dsolve('D3y-3*D2y+3*Dy-y=0','D2y(0)=3','Dy(0)=2','y(0)=1') y =exp(t) + t*exp(t)
>> y=dsolve('D3y-5*D2y=(7*t-4)*exp(2*t)') y =C10*exp(5*t) - exp(5*t)*(exp(-3*t)*((7*t)/12 - 13/18) -exp(-5*t)* (C8/25 + C9 + (C8*t)/5)) >> simplify (y) ans = C8/25 + C9 + (13*exp(2*t))/18 - (7*t*exp(2*t))/12 + (C8*t)/5 + C10*exp(5*t) >> pretty(ans) C8 exp(2 t) 13 t exp(2 t) 7 C8 t -- + C9 + ----------- - ------------ + ---- + C10 exp(5 t) 25 18 12 5
Con la función
Obtenemos
La integral general
>> y=dsolve('D2y-Dy=5*sin(t)') y = C11 + C12*exp(t) + (5*2^(1/2)*cos(t + pi/4))/2 >> expand(y) ans =C11 + (5*cos(t))/2 - (5*sin(t))/2 + C12*exp(t)
La integral general
>> y=dsolve('D2y+4*y=7*cos(2*t)') y =(21*cos(2*t))/32 + (7*cos(6*t))/32 + sin(2*t)*((7*t)/4 + (7*sin(4*t))/16) + C3*cos(2*t) - C4*sin(2*t) >> simplify(y) ans = (7*cos(2*t))/8 + (7*t*sin(2*t))/4 + C3*cos(2*t) - C4*sin(2*t)
>> dsolve('2*D2y+4*Dy=t*sin(t)') ans = C5 - cos(t)/25 + (7*sin(t))/25 - (t*cos(t))/5 - (t*sin(t))/10 + C6*exp(-2*t) >> pretty(ans) cos(t) 7 sin(t) t cos(t) t sin(t) C5 - ------ + -------- - -------- - -------- + C6 exp(-2 t) 25 25 5 10
>> y=dsolve('D4y-2*D3y+2*D2y-2*Dy+y=5*exp(t)') y =(5*t^2*exp(t))/2 + C9*cos(t) + C7*exp(t) - C10*sin(t) + (5*exp(t)*cos(t)*(cos(t) + sin(t)))/4 - (5*t*exp(t)*(t + 2))/4 - (5*exp(t)*sin(t)*(cos(t) - sin(t)))/4 + C8*t*exp(t) >> y=simplify(y) y = (5*exp(t))/4 + (5*t^2*exp(t))/4 + C9*cos(t) + C7*exp(t) - C10*sin(t) - (5*t*exp(t))/2 + C8*t*exp(t)
>> y=dsolve('D2y+y=(cos(2*t))^2+(sin(t/2))^2') y =sin(t)*(sin(3*t)/12 - sin(2*t)/8 - t/4 + sin(5*t)/20 + sin(t)) + C11*cos(t) - C12*sin(t) - cos(t)*(cos(2*t)/8 + cos(3*t)/12 - cos(5*t)/20 - cos(t) + 1/8) >> y=simplify(y) y = C11*cos(t) - cos(t)/4 - cos(4*t)/30 - C12*sin(t) - (t*sin(t))/4 + 1
Ejercicios con condiciones iniciales
y''-5y'+6y=(12t-7)e-t, y(0)=y'=0
y''-6y'+9y=t2-t+3, y(0)=4/3, y'(0)=1/27
y''+4y=4(sen2t+cos2t), y(π)=y'(π)=2π
yIV-y=8et, y(0)=0, y'(0)=2, y''(0)=4, y'''(0)=6
>> y=dsolve('D2y-5*Dy+6*y=(12*t-7)*exp(-t)','y(0)=0','Dy(0)=0') y =exp(2*t) - exp(3*t) - exp(-t)*(3*t - 1) + exp(-t)*(4*t - 1) >> y=simplify(y) y =exp(-t)*(t + exp(3*t) - exp(4*t))
>> y=dsolve('D2y-6*Dy+9*y=t^2-t+3','y(0)=4/3','Dy(0)=1/27') y =t/27 + exp(3*t) - 3*t*exp(3*t) + t^2/9 + 1/3
>> dsolve('D2y+4*y=4*(sin(2*t)+cos(2*t))','y(pi)=2*pi','Dy(pi)=2*pi') ans =sin(2*t)/4 - cos(2*t)*(t - (2^(1/2)*sin(4*t + pi/4))/4) + sin(2*t)*(t - (2^(1/2)*cos(4*t + pi/4))/4) + cos(2*t)*(3*pi - 1/4) >> simplify(ans) ans =sin(2*t)/2 - t*cos(2*t) + t*sin(2*t) + 3*pi*cos(2*t)
>> y=dsolve('D4y-y=8*exp(t)','y(0)=0','Dy(0)=2','D2y(0)=4','D3y(0)=6') y =2*exp(t) + 2*t*exp(t) - 2*exp(t)*sin(t)*(cos(t) + sin(t)) - 2*exp(t)*cos(t)*(cos(t) - sin(t)) >> simplify(y) ans =2*t*exp(t)
Ecuaciones de Euler
t2y''+ty'+y=t(6-lnt)
t2y''-ty'-3y=-16ln(t)/t
t2y''-ty'+2y=tln(t)
t2y''-2ty'+2y=t2-2t+2
t2y''+4ty'+2y=2ln2t+12t
t2y''+2ty''-4y'+4y/t=2t
t2y''-ty'-3y=5t3ln(t)
>> y=dsolve('t^2*D2y+t*Dy+y=t*(6-log(t))') y =C14*cos(log(t)) - C13*sin(log(t)) + (t*cos(log(t))*(7*cos(log(t)) - 6*sin(log(t)) - cos(log(t))*log(t) + sin(log(t))*log(t)))/2 + (t*sin(log(t))*(6*cos(log(t)) + 7*sin(log(t)) - cos(log(t))*log(t) - sin(log(t))*log(t)))/2 >> simplify(y) ans = (7*t)/2 - (t*log(t))/2 + C14*cos(log(t)) - C13*sin(log(t))
>> y=dsolve('t^2*D2y-t*Dy-3*y=-16*log(t)/t') y = (C15 + log(t) + 2*log(t)^2 + 1/4)/t + C16*t^3
>> y=dsolve('t^2*D2y-t*Dy+2*y=t*log(t)') y =C18*t*cos(log(t)) - t*cos(log(t))*(sin(log(t)) - cos(log(t))*log(t)) + t*sin(log(t))*(cos(log(t)) + sin(log(t))*log(t)) - C17*t*sin(log(t)) >> simplify(y) ans =t*(log(t) + C18*cos(log(t)) - C17*sin(log(t)))
>> y=dsolve('t^2*D2y-2*t*Dy+2*y=t^2-2*t+2') y =C20*t + C19*t^2 + t*(2*log(t) - t + 2/t) + t^2*(log(t) + (2*t - 1)/t^2) >> simplify(y) ans = 2*t + t^2*log(t) + C20*t + C19*t^2 + 2*t*log(t) - t^2 + 1
C19-1=A; C20+2=B.
>> y=dsolve('t^2*D2y+4*t*Dy+2*y=2*(log(t))^2+12*t') y = -(C22 + 3*t^2*log(t) + C21*t - t^2*log(t)^2 - (7*t^2)/2 - 2*t^3)/t^2 >> simplify(y) ans =-(C22 + 3*t^2*log(t) + C21*t - t^2*log(t)^2 - (7*t^2)/2 - 2*t^3)/t^2 >> expand(ans) ans =2*t - 3*log(t) + log(t)^2 - C21/t - C22/t^2 + 7/2
>> y=dsolve('t^3*D3y+2*t^2*D2y-4*t*Dy+4*y=2*t^2') y = (t^2*log(t))/2 + C24*t + C23*t^2 + C25/t^2 - (5*t^2)/8
C23-5/8=B
>> y=dsolve('t^2*D2y-t*Dy-3*y=5*t^3*log(t)') y =C27*t^3 + t^3*((5*log(t)^2)/8 - (5*log(t))/16 + C26/(4*t^4))
Sistemas de ecuaciones diferenciales
>> syms x y; >> [x, y]=dsolve('Dx=-7*x+y+5','Dy=-2*x-5*y-37*t','x(0)=0','y(0)=0') x =1 - exp(-6*t)*cos(t) - t y = exp(-6*t)*sin(t) - exp(-6*t)*cos(t) - 7*t + 1
x=1-t-e-6tcost, y=1-7t-e-6tcost+e-6tsent
>> [x y]=dsolve('Dx=3*x-y/2-3*t^2-t/2+3/2','Dy=2*y-2*t-1') x = (exp(2*t)*(C30 + exp(-2*t)*(t + 1)))/2 + exp(3*t)* (C31 + (exp(-3*t)*(2*t - 1)*(t + 1))/2) y =exp(2*t)*(C30 + exp(-2*t)*(t + 1)) >> simplify([x y]) ans = [ t + t^2 + (C30*exp(2*t))/2 + C31*exp(3*t), t + C30*exp(2*t) + 1]
>> [x y]=dsolve('Dx+2*Dy=17*x+8*y','13*Dx=53*x+2*y','x(0)=2','y(0)=-1') x =exp(3*t) + exp(5*t) y =6*exp(5*t) - 7*exp(3*t)
>> [x y]=dsolve('Dx+Dy=exp(-t)-y','2*Dx+Dy=sin(t)-2*y','x(0)=-2','y(0)=1') x =- 2*t - exp(-t) - 2^(1/2)*cos(t - pi/4) y =cos(t) - 2*exp(-t) + 2 >> x=expand(x) x = - 2*t - exp(-t) - cos(t) - sin(t)