0
$\begingroup$

I'd like to get the inverse Laplace transform of a symbolic expression. The output of my code is equal to the input? How can I modify the code to obtain the correct result?

All k and V1 are positives.

InverseLaplaceTransform[(s + Subscript[k, 2] + Subscript[k, 12])/
 Subscript[V, 1][
  s^2 + s[Subscript[k, 1] + Subscript[k, 2] + Subscript[k, 12] + 
     Subscript[k, 21]] + Subscript[k, 1] Subscript[k, 2] + 
   Subscript[k, 1] Subscript[k, 12] + 
   Subscript[k, 2] Subscript[k, 21]], s, t]

enter image description here

Thank you so much in advance.

$\endgroup$
2
$\begingroup$

Don't use a square brackets.

$\mathcal{L}_s^{-1}\left[\frac{s+k_2+k_{12}}{V_1 \left(s^2+s \left(k_1+k_2+k_{12}+k_{21}\right)+k_1 k_2+k_1 k_{12}+k_2 k_{21}\right)}\right](t)$

InverseLaplaceTransform[
(s + Subscript[k, 2] + Subscript[k, 12])/(Subscript[V, 
1]*(s^2 + s*(Subscript[k, 1] + Subscript[k, 2] + Subscript[k, 12] + 
Subscript[k, 21]) + Subscript[k, 1] Subscript[k, 2] + 
Subscript[k, 1] Subscript[k, 12] + Subscript[k, 2] Subscript[k, 21])), s, t]

$\frac{e^{t \left(-\frac{k_1}{2}-\frac{k_2}{2}-\frac{k_{12}}{2}-\frac{k_{21}}{2}-\frac{1}{2} \sqrt{\left(k_1+k_2+k_{12}+k_{21}\right){}^2-4 \left(k_1 k_2+k_{21} k_2+k_1 k_{12}\right)}\right)} k_1-e^{t \left(-\frac{k_1}{2}-\frac{k_2}{2}-\frac{k_{12}}{2}-\frac{k_{21}}{2}+\frac{1}{2} \sqrt{\left(k_1+k_2+k_{12}+k_{21}\right){}^2-4 \left(k_1 k_2+k_{21} k_2+k_1 k_{12}\right)}\right)} k_1-e^{t \left(-\frac{k_1}{2}-\frac{k_2}{2}-\frac{k_{12}}{2}-\frac{k_{21}}{2}-\frac{1}{2} \sqrt{\left(k_1+k_2+k_{12}+k_{21}\right){}^2-4 \left(k_1 k_2+k_{21} k_2+k_1 k_{12}\right)}\right)} k_2+e^{t \left(-\frac{k_1}{2}-\frac{k_2}{2}-\frac{k_{12}}{2}-\frac{k_{21}}{2}+\frac{1}{2} \sqrt{\left(k_1+k_2+k_{12}+k_{21}\right){}^2-4 \left(k_1 k_2+k_{21} k_2+k_1 k_{12}\right)}\right)} k_2-e^{t \left(-\frac{k_1}{2}-\frac{k_2}{2}-\frac{k_{12}}{2}-\frac{k_{21}}{2}-\frac{1}{2} \sqrt{\left(k_1+k_2+k_{12}+k_{21}\right){}^2-4 \left(k_1 k_2+k_{21} k_2+k_1 k_{12}\right)}\right)} k_{12}+e^{t \left(-\frac{k_1}{2}-\frac{k_2}{2}-\frac{k_{12}}{2}-\frac{k_{21}}{2}+\frac{1}{2} \sqrt{\left(k_1+k_2+k_{12}+k_{21}\right){}^2-4 \left(k_1 k_2+k_{21} k_2+k_1 k_{12}\right)}\right)} k_{12}+e^{t \left(-\frac{k_1}{2}-\frac{k_2}{2}-\frac{k_{12}}{2}-\frac{k_{21}}{2}-\frac{1}{2} \sqrt{\left(k_1+k_2+k_{12}+k_{21}\right){}^2-4 \left(k_1 k_2+k_{21} k_2+k_1 k_{12}\right)}\right)} k_{21}-e^{t \left(-\frac{k_1}{2}-\frac{k_2}{2}-\frac{k_{12}}{2}-\frac{k_{21}}{2}+\frac{1}{2} \sqrt{\left(k_1+k_2+k_{12}+k_{21}\right){}^2-4 \left(k_1 k_2+k_{21} k_2+k_1 k_{12}\right)}\right)} k_{21}+e^{t \left(-\frac{k_1}{2}-\frac{k_2}{2}-\frac{k_{12}}{2}-\frac{k_{21}}{2}-\frac{1}{2} \sqrt{\left(k_1+k_2+k_{12}+k_{21}\right){}^2-4 \left(k_1 k_2+k_{21} k_2+k_1 k_{12}\right)}\right)} \sqrt{\left(k_1+k_2+k_{12}+k_{21}\right){}^2-4 \left(k_1 k_2+k_{21} k_2+k_1 k_{12}\right)}+e^{t \left(-\frac{k_1}{2}-\frac{k_2}{2}-\frac{k_{12}}{2}-\frac{k_{21}}{2}+\frac{1}{2} \sqrt{\left(k_1+k_2+k_{12}+k_{21}\right){}^2-4 \left(k_1 k_2+k_{21} k_2+k_1 k_{12}\right)}\right)} \sqrt{\left(k_1+k_2+k_{12}+k_{21}\right){}^2-4 \left(k_1 k_2+k_{21} k_2+k_1 k_{12}\right)}}{2 \sqrt{\left(k_1+k_2+k_{12}+k_{21}\right){}^2-4 \left(k_1 k_2+k_{21} k_2+k_1 k_{12}\right)} V_1}$

$\endgroup$
  • $\begingroup$ very good! Thank you so much! $\endgroup$ – Gennaro Arguzzi Dec 7 '17 at 14:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.