Professional Documents
Culture Documents
TODO
TODO
> restart
4$x
> edo d diff y x , x$2 K diff y x , x K12$y x = e
2
d d 4x
edo d 2 y x K y x K12 y x = e (1)
dx dx
> dsolve edo, y x
4x
K3 x 4x xe
y x =e _C2 Ce _C1 C (2)
7
4$x
> edo d diff y x , x$2 K diff y x , x K12$y x = e
2
d d 4x
edo d 2 y x K y x K12 y x = e (3)
dx dx
yx
1
K2 K1 0 1 2
x
K1
K2
yx
1
K2 K1 0 1 2
x
K1
> restart
2
> edo1 d diff y x , x =K2 $x$y x
d 2
edo1 d y x = K2 x y x (7)
dx
> sol d dsolve edo1, y 0 = 1 , y x
(8)
1
sol d y x = 2
(8)
x C1
> yex d rhs sol # yexacta com a expressió
1
yex d 2
(9)
x C1
> yexfun d unapply yex, x # yexacta com a funció
1
yexfun d x 1 2
(10)
x C1
2
> f d x, y /K2 x$y
2
f d x, y 1 K2$x$y (11)
> a d 0.; b d 1.; h d 0.1 ; N d 10
a d 0.
b d 1.
h d 0.1
N d 10 (12)
> x 0 d a; y 0 d 1
x0 d 0.
y0 d 1 (13)
> for i from 0 to N K1 do
x i C1 d x i Ch;
y i C1 d y i Ch$f x i , y i ;
end do
x1 d 0.1
y1 d 1.
x2 d 0.2
y2 d 0.98
x3 d 0.3
y3 d 0.941584
x4 d 0.4
y4 d 0.8883891743
x5 d 0.5
y5 d 0.8252503483
x6 d 0.6
y6 d 0.7571465346
x7 d 0.7
y7 d 0.6883540296
x8 d 0.8
y8 d 0.6220176518
x9 d 0.9
y9 d 0.5601126983
x10 d 1.0
y10 d 0.5036419760 (14)
> y 5 ; yexfun 0.5
0.8252503483
0.8000000000 (15)
> y 5 Kyexfun 0.5
0.0252503483 (16)
> abs %
0.0252503483 (17)
> restart
> with inttrans # carreguem el paquet inttrans
addtable, fourier, fouriercos, fouriersin, hankel, hilbert, invfourier, invhilbert, invlaplace, (18)
invmellin, laplace, mellin, savetable, setup
> laplace sin 3$t Ccos 2$t , t, s
3 s
2
C 2
(19)
s C9 s C4
> restart; with inttrans
addtable, fourier, fouriercos, fouriersin, hankel, hilbert, invfourier, invhilbert, invlaplace, (20)
invmellin, laplace, mellin, savetable, setup
2
3$ s K7$s K4
> Fd 3
s C4 $ s K2
2
3 s K7 s K4
Fd 3
(21)
s C4 s K2
> Fp d convert F, parfrac, s
1 1 1 1
Fp dK K 3
C C 2
(22)
3 s C4 s K2 3 s K2 s K2
> fp d invlaplace Fp, s, t
K4 t 2t 2
e e 3 t K6 t K2
fp dK K (23)
3 6
> f d invlaplace F, s, t
K4 t 2t 2
e e 3 t K6 t K2
f dK K (24)
3 6
> simplify f Kfp
0 (25)
> f d invlaplace F, s, t
K4 t 2t 2
e e 3 t K6 t K2
f dK K (26)
3 6
2
3$ s K7$s K4
> invlaplace 3
, s, t
s C4 $ s K2
K4 t 2t 2
e e 3 t K6 t K2
K K (27)
3 6
>