Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Uso de Las Tic S Unidad 4

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

Ecuaciones

Diferenciales

Uso de las Tic's Unidad 4

Ing. Francisco Javier Guerrero Negrellos

Juan Pablo Carrasco Huerta

1-

In [33]: t = var ('t')


x = function ('x')(t)
y = function ('y')(t)
dx1 = diff(x,t)==2*x+(2+i)*y
dy1 = diff(y,t)==-1*x+(-1-i)*y
desolve_system([dx1, dy1], [x,y])

Out[33]: [x(t) == (1/2*I - 1/2)*(x(0) + (I + 2)*y(0))*e^(-I*t) - (1/2*I - 1/2)*((I + 2)*x(0) + (I + 2)*y(0))*e^t,


y(t) == -(1/2*I - 1/2)*(x(0) + (I + 2)*y(0))*e^(-I*t) + (1/2*I - 1/2)*(x(0) + y(0))*e^t]

2.-

In [27]: t = var ('t')


x = function ('x')(t)
y = function ('y')(t)
z = function ('z')(t)
dx1 = diff(x,t)== x+y+2*z
dy1 = diff(y,t)== x+2*y+z
dz1 = diff(z,t)== 2*x+y+z
desolve_system([dx1, dy1, dz1], [x,y,z])

Out[27]: [x(t) == 1/3*(x(0) + y(0) + z(0))*e^(4*t) + 1/2*(x(0) - z(0))*e^(-t) + 1/6*(x(0) - 2*y(0) + z(0))*e^t,
y(t) == 1/3*(x(0) + y(0) + z(0))*e^(4*t) - 1/3*(x(0) - 2*y(0) + z(0))*e^t,
z(t) == 1/3*(x(0) + y(0) + z(0))*e^(4*t) - 1/2*(x(0) - z(0))*e^(-t) + 1/6*(x(0) - 2*y(0) + z(0))*e^t]

3.-

In [26]: t = var ('t')


x = function ('x')(t)
y = function ('y')(t)
z = function ('z')(t)
dx1 = diff(x,t)== 3*x+2*y+4*z
dy1 = diff(y,t)== 2*x+0*y+2*z
dz1 = diff(z,t)== 4*5*x+2*y+3*z
desolve_system([dx1, dy1, dz1], [x,y,z])

Out[26]: [x(t) == -1/337*(sqrt(337)*(x(0) - 4*y(0) - 8*z(0))*sinh(1/2*sqrt(337)*t) - 337*cosh(1/2*sqrt(337)*t)*x(0))*e^(7/2*t),


y(t) == -1/674*(sqrt(337)*(x(0) - 4*y(0) - 8*z(0))*sinh(1/2*sqrt(337)*t) - 337*cosh(1/2*sqrt(337)*t)*x(0))*e^(7/2*t) -
1/2*(x(0) - 2*y(0))*e^(-t),
z(t) == 1/1348*(sqrt(337)*(169*x(0) - 2*y(0) - 4*z(0))*sinh(1/2*sqrt(337)*t) - 337*(x(0) - 2*y(0) -
4*z(0))*cosh(1/2*sqrt(337)*t))*e^(7/2*t) + 1/4*(x(0) - 2*y(0))*e^(-t)]

4.-

In [34]: t = var ('t')


x = function ('x')(t)
y = function ('y')(t)
z = function ('z')(t)
dx1 = diff(x,t)== x+y+z
dy1 = diff(y,t)== 2*x+1*y-1*z
dz1 = diff(z,t)== -8*x-5*y-3*z
desolve_system([dx1, dy1, dz1], [x,y,z])

Out[34]: [x(t) == (3*x(0) + y(0) + z(0))*e^(-t) - (2*x(0) + y(0) + z(0))*e^(-2*t),


y(t) == 1/12*(18*x(0) + 13*y(0) + z(0))*e^(2*t) - 4/3*(3*x(0) + y(0) + z(0))*e^(-t) + 5/4*(2*x(0) + y(0) +
z(0))*e^(-2*t),
z(t) == -1/12*(18*x(0) + 13*y(0) + z(0))*e^(2*t) - 2/3*(3*x(0) + y(0) + z(0))*e^(-t) + 7/4*(2*x(0) + y(0) +
z(0))*e^(-2*t)]

5.-
5.-

In [35]: t = var ('t')


x = function ('x')(t)
y = function ('y')(t)
z = function ('z')(t)
dx1 = diff(x,t)== 1*x-1*y+4*z
dy1 = diff(y,t)== 3*x+2*y-1*z
dz1 = diff(z,t)== 2*x+1*y-1*z
desolve_system([dx1, dy1, dz1], [x,y,z])

Out[35]: [x(t) == 1/2*(x(0) + z(0))*e^(3*t) + 1/3*(x(0) + y(0) - 3*z(0))*e^(-2*t) + 1/6*(x(0) - 2*y(0) + 3*z(0))*e^t,
y(t) == (x(0) + z(0))*e^(3*t) - 1/3*(x(0) + y(0) - 3*z(0))*e^(-2*t) - 2/3*(x(0) - 2*y(0) + 3*z(0))*e^t,
z(t) == 1/2*(x(0) + z(0))*e^(3*t) - 1/3*(x(0) + y(0) - 3*z(0))*e^(-2*t) - 1/6*(x(0) - 2*y(0) + 3*z(0))*e^t]

6.-

In [38]: t = var ('t')


x = function ('x')(t)
y = function ('y')(t)
z = function ('z')(t)
dx1 = diff(x,t)== 1*x+0*y+0*z
dy1 = diff(y,t)== 2*x+1*y-2*z
dz1 = diff(z,t)== 3*x+2*y+1*z
desolve_system([dx1, dy1, dz1], [x,y,z])

Out[38]: [x(t) == e^t*x(0),


y(t) == 1/2*((3*x(0) + 2*y(0))*cos(2*t) + 2*(x(0) - z(0))*sin(2*t))*e^t - 3/2*e^t*x(0),
z(t) == -1/2*(2*(x(0) - z(0))*cos(2*t) - (3*x(0) + 2*y(0))*sin(2*t))*e^t + e^t*x(0)]

7.-

In [40]: t = var ('t')


x = function ('x')(t)
y = function ('y')(t)
z = function ('z')(t)
dx1 = diff(x,t)== -3*x+0*y+2*z
dy1 = diff(y,t)== 1*x-1*y+0*z
dz1 = diff(z,t)== -2*x-1*y+0*z
desolve_system([dx1, dy1, dz1], [x,y,z])

Out[40]: [x(t) == -1/3*(sqrt(2)*(2*x(0) + y(0) - 2*z(0))*sin(sqrt(2)*t) - (x(0) + 2*y(0) + 2*z(0))*cos(sqrt(2)*t))*e^(-t) + 2/3*


(x(0) - y(0) - z(0))*e^(-2*t),
y(t) == 1/6*(sqrt(2)*(x(0) + 2*y(0) + 2*z(0))*sin(sqrt(2)*t) + 2*(2*x(0) + y(0) - 2*z(0))*cos(sqrt(2)*t))*e^(-t) - 2/3*
(x(0) - y(0) - z(0))*e^(-2*t),
z(t) == -1/6*(sqrt(2)*(5*x(0) + 4*y(0) - 2*z(0))*sin(sqrt(2)*t) + 2*(x(0) - y(0) - 4*z(0))*cos(sqrt(2)*t))*e^(-t) + 1/3*
(x(0) - y(0) - z(0))*e^(-2*t)]

8.-

In [41]: t = var ('t')


x = function ('x')(t)
y = function ('y')(t)
dx1 = diff(x,t)==-(5/4)*x+(3/4)*y
dy1 = diff(y,t)==(3/4)*x-(5/4)*y
desolve_system([dx1, dy1], [x,y])

Out[41]: [x(t) == 1/2*(x(0) + y(0))*e^(-1/2*t) + 1/2*(x(0) - y(0))*e^(-2*t),


y(t) == 1/2*(x(0) + y(0))*e^(-1/2*t) - 1/2*(x(0) - y(0))*e^(-2*t)]

9.-

In [42]: t = var ('t')


x = function ('x')(t)
y = function ('y')(t)
dx1 = diff(x,t)==-3*x+sqrt(2)*y
dy1 = diff(y,t)==sqrt(2)*x-2*y
desolve_system([dx1, dy1], [x,y])

Out[42]: [x(t) == 1/3*(sqrt(2)*y(0) + x(0))*e^(-t) - 1/3*(sqrt(2)*y(0) - 2*x(0))*e^(-4*t),


y(t) == 1/3*(sqrt(2)*x(0) + 2*y(0))*e^(-t) - 1/3*(sqrt(2)*x(0) - y(0))*e^(-4*t)]

10.-
In [44]: t = var ('t')
x = function ('x')(t)
y = function ('y')(t)
dx1 = diff(x,t)== 10*x-25*y
dy1 = diff(y,t)== 5*x-10*y
desolve_system([dx1, dy1], [x,y])

Out[44]: [x(t) == (2*x(0) - 5)*sin(5*t) + cos(5*t)*x(0),


y(t) == (x(0) - 2)*sin(5*t) + cos(5*t)]

In [45]: sol = desolve_system([dx1, dy1], [x,y], ics=[0, 0, cos(t)]); sol

Out[45]: [x(t) == -5*sin(5*t), y(t) == cos(5*t) - 2*sin(5*t)]

In [0]:

You might also like