\( \DeclareMathOperator{\abs}{abs} \newcommand{\ensuremath}[1]{\mbox{$#1$}} \)
(%i1) | kill ( all ) ; |
\[\operatorname{ }\ensuremath{\mathrm{done}}\]
(%i1) |
pdbo2
:
a
·
'
diff
(
x
(
t
)
,
t
,
2
)
+
b
·
'
diff
(
x
(
t
)
,
t
,
1
)
+
c
=
%e
^
t
;
/*persamaan differensial orde 2; a, b dan c adalah konstanta*/ |
\[\operatorname{(pdbo2) }a\, \left( \frac{{{d}^{2}}}{d {{t}^{2}}} \operatorname{x}(t)\right) +b\, \left( \frac{d}{d t} \operatorname{x}(t)\right) +c={{\% e}^{t}}\]
(%i2) |
trlap
:
laplace
(
pdbo2
,
t
,
p
)
;
/*transformasi Laplace PDBO2 tersebut, variabel lama adalah t dan variabel baru adalah p*/ |
\[\operatorname{(trlap) }a\, \left( -\left. \frac{d}{d t} \operatorname{x}(t)\right|_{t=0}+{{p}^{2}} \operatorname{laplace}\left( \operatorname{x}(t)\operatorname{,}t\operatorname{,}p\right) -\operatorname{x}(0) p\right) +b\, \left( p \operatorname{laplace}\left( \operatorname{x}(t)\operatorname{,}t\operatorname{,}p\right) -\operatorname{x}(0)\right) +\frac{c}{p}=\frac{1}{p-1}\]
(%i3) |
syawal
:
subst
(
[
x
(
0
)
=
0
,
at
(
'
diff
(
x
(
t
)
,
t
)
,
t
=
0
)
=
0
]
,
trlap
)
;
/*masukkan syarat awal*/ |
\[\operatorname{(syawal) }a {{p}^{2}} \operatorname{laplace}\left( \operatorname{x}(t)\operatorname{,}t\operatorname{,}p\right) +b p \operatorname{laplace}\left( \operatorname{x}(t)\operatorname{,}t\operatorname{,}p\right) +\frac{c}{p}=\frac{1}{p-1}\]
(%i4) |
solusi
:
solve
(
syawal
,
'
laplace
(
x
(
t
)
,
t
,
p
)
)
;
/*selesaikan persamaan linier yang dihasilkan*/ |
\[\operatorname{(solusi) }\left[ \operatorname{laplace}\left( \operatorname{x}(t)\operatorname{,}t\operatorname{,}p\right) =-\frac{\left( c-1\right) p-c}{a {{p}^{4}}+\left( b-a\right) {{p}^{3}}-b {{p}^{2}}}\right] \]
(%i5) |
solusi_akhir
:
ilt
(
solusi
[
1
]
,
p
,
t
)
;
/*gunakan inverse transformasi laplace untuk mendapatkan solusi x(t)*/ |
\[\operatorname{(solusi\_ akhir) }\operatorname{x}(t)=-\frac{\left( \left( {{a}^{2}} b+{{a}^{3}}\right) c-{{a}^{2}} b\right) {{\% e}^{-\frac{b t}{a}}}}{a\, \left( {{b}^{3}}+a {{b}^{2}}\right) }+\frac{{{\% e}^{t}}}{b+a}-\frac{c t}{b}+\frac{a c-b}{{{b}^{2}}}\]
(%i6) | solkhus : subst ( [ a = 1 , b = 2 , c = 3 ] , rhs ( solusi_akhir ) ) ; |
\[\operatorname{(solkhus) }\frac{{{\% e}^{t}}}{3}-\frac{7 {{\% e}^{-2 t}}}{12}-\frac{3 t}{2}+\frac{1}{4}\]
(%i7) | define ( x ( t ) , solkhus ) ; |
\[\operatorname{ }\operatorname{x}(t)\operatorname{:=}\frac{{{\% e}^{t}}}{3}-\frac{7 {{\% e}^{-2 t}}}{12}-\frac{3 t}{2}+\frac{1}{4}\]
(%i8) | x ( 1 ) ; |
\[\operatorname{ }\frac{\% e}{3}-\frac{7 {{\% e}^{-2}}}{12}-\frac{5}{4}\]
Created with wxMaxima.
Tidak ada komentar:
Posting Komentar