Você está na página 1de 3

osciladores.

wxm

1 / 3

(%i1) ode2('diff(y,x,2)+5*y, y, x);


(%o1) y = %k1 sin

5 x + %k2 cos

5x

(%i2) y(x,k1,k2):=k1*sin(sqrt(5)*x)+k2*cos(sqrt(5)*x);
q

(%o2) y( x , k1 , k2 ) := k1 sin

5 x + k2 cos

(%i3) define(dy(x,k1,k2),diff(y(x,k1,k2),x,1));
(%o3) dy( x , k1 , k2 ) :=

5 k1 cos

5x {

5x

)
q

5 k2 sin

5x

(%i4) wxplot2d([y(x,0,1),dy(x,0,1)], [x,0,5])$

(%t4)

Pouco atrito
(%i5) ode2('diff(y,x,2)+'diff(y,x,1)+3*y, y, x);
{

(%o5) y = %e

x
2

%k1 sin

11 x
2

+ %k2 cos

11 x
2

(%i6) ypa(x,k1,k2):=exp(-x/2)*(k1*sin((sqrt(11)*x)/2)+k2*cos((sqrt(11)*x)/2));
(%o6) ypa( x , k1 , k2 ) := exp

k1 sin

(%i7) define(dypa(x,k1,k2),diff(ypa(x,k1,k2),x,1));
0

(%o7) dypa( x , k1 , k2 ) := %e

q
xB
11 k1 cos
{ B
B
B
@
2B

11 x
2

11 x
2

+ k2 cos

11 k2 sin
2

11 x

11 x
2

C %e
C
C
C
C
A{

x
2

k1 sin

11 x
2

+ k2 cos

11 x
2

osciladores.wxm

2 / 3

(%i8) wxplot2d([ypa(x,1,1),dypa(x,1,1)], [x,0,10])$

(%t8)

Muito atrito
(%i9) ode2('diff(y,x,2)+2*'diff(y,x,1)+0.1*y, y, x);
rat: replaced 0.1 by 1/10
0 q= 0.11
0
1
q
B3 2
C
B
@ q { 2C
Ax
5

(%o9) y = %k1 %e

+ %k2 %e

B 3 2
C
B
@{ q { 2 C
Ax
5
2

(%i10) yma(x,k1,k2):=k1*exp((((3*sqrt(2))/sqrt(5)-2)*x)/2)+k2*exp(((-(3*sqrt(2))/sqrt(5)-2)*x)/2);
0
1
0
1
q
q

3 2
B
B q {2
B
B
5
B
@

(%o10) yma( x , k1 , k2 ) := k1 exp

B
C
B
xC
C
B
C
B
C
B
A
+ k2 exp@

(%i11) define(dyma(x,k1,k2),diff(yma(x,k1,k2),x,1));
0

(%o11) dyma( x , k1 , k2 ) :=

{2

k1 %e

3 2
B
C
B
@ q { 2C
Ax
5
2

(%i12) wxplot2d([yma(x,1,1),dyma(x,1,1)], [x,0,100])$

(%t12)

atrito critico

{ q

{2

{2

C
xC
C
C
C
A

k2 %e
2

3 2
B
C
B
@{ q { 2 C
Ax
5
2

osciladores.wxm

3 / 3

(%i13) ode2('diff(y,x,2)+2*'diff(y,x,1)+y, y, x);


(%o13) y = ( %k2 x + %k1 ) %e

{x

(%i14) yac(x,k1,k2):=(k2*x+k1)*exp(-x);
(%o14) yac( x , k1 , k2 ) := ( k2 x + k1 ) exp( { x )
(%i15) define(dyac(x,k1,k2),diff(yac(x,k1,k2),x,1));
(%o15) dyac( x , k1 , k2 ) := k2 %e

{x

{
{ ( k2 x + k1 ) %e x

(%i16) wxplot2d([yac(x,1,1),dyac(x,1,1)], [x,0,10])$

(%t16)