You are on page 1of 5

a Calculeu la soluci´o general

> 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

> dsolve edo, y 0 = 0, D y 0 = 0 , y x


K3 x 4x 4x
e e xe
y x = K C (4)
49 49 7
> restart
2
> edo1 d diff y x , x =K2 $x$y
d 2
edo1 d y x = K2 x y (5)
dx
> with DEtools # obrim el paquet DEtools
AreSimilar, Closure, DEnormal, DEplot, DEplot3d, DEplot_polygon, DFactor, (6)
DFactorLCLM, DFactorsols, Dchangevar, Desingularize, FindODE,
FunctionDecomposition, GCRD, Gosper, Heunsols, Homomorphisms, IVPsol,
IsHyperexponential, LCLM, MeijerGsols, MultiplicativeDecomposition, ODEInvariants,
PDEchangecoords, PolynomialNormalForm, RationalCanonicalForm, ReduceHyperexp,
RiemannPsols, Xchange, Xcommutator, Xgauge, Zeilberger, abelsol, adjoint, autonomous,
bernoullisol, buildsol, buildsym, canoni, caseplot, casesplit, checkrank, chinisol, clairautsol,
constcoeffsols, convertAlg, convertsys, dalembertsol, dcoeffs, de2diffop, dfieldplot,
diff_table, diffop2de, dperiodic_sols, dpolyform, dsubs, eigenring, endomorphism_charpoly,
equinv, eta_k, eulersols, exactsol, expsols, exterior_power, firint, firtest, formal_sol,
gen_exp, generate_ic, genhomosol, gensys, hamilton_eqs, hypergeomsols, hyperode,
indicialeq, infgen, initialdata, integrate_sols, intfactor, invariants, kovacicsols, leftdivision,
liesol, line_int, linearsol, matrixDE, matrix_riccati, maxdimsystems, moser_reduce,
muchange, mult, mutest, newton_polygon, normalG2, ode_int_y, ode_y1, odeadvisor,
odepde, parametricsol, particularsol, phaseportrait, poincare, polysols, power_equivalent,
rational_equivalent, ratsols, redode, reduceOrder, reduce_order, regular_parts, regularsp,
remove_RootOf, riccati_system, riccatisol, rifread, rifsimp, rightdivision, rtaylor,
separablesol, singularities, solve_group, super_reduce, symgen, symmetric_power,
symmetric_product, symtest, transinv, translate, untranslate, varparam, zoom
> DEplot edo1, y x , x =K2 ..2, y =K2 ..2
Warning, y is present as both a dependent variable and a name.
Inconsistent specification of the dependent variable is
deprecated, and it is assumed that the name is being used in
place of the dependent variable.
2

yx
1

K2 K1 0 1 2
x

K1

K2

> DEplot edo1, y x , x =K2 ..2, y =K1.25 ..2, 0,K1 , 0, 0 , 0, 1


Warning, y is present as both a dependent variable and a name.
Inconsistent specification of the dependent variable is
deprecated, and it is assumed that the name is being used in
place of the dependent variable.
2

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
>

You might also like