rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

laplace transform of integral bug #415

Open rtoy opened 4 months ago

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-02 19:45:29 Created by eouellette on 2014-03-29 06:28:57 Original: https://sourceforge.net/p/maxima/bugs/2712


/* [wxMaxima: title   start ]
Laplace Transform of integral (in source domain) bugs
   [wxMaxima: title   end   ] */
/* [wxMaxima: comment start ]
wxMaxima 13.04.2 Windows platform
   [wxMaxima: comment end   ] */
/* [wxMaxima: input   start ] */
declare(C,constant)$
/* [wxMaxima: input   end   ] */
/* [wxMaxima: input   start ] */
display_format_internal : true$
noundisp : true$
/* [wxMaxima: input   end   ] */
/* [wxMaxima: comment start ]
Laplace Transform of Constant times Integral of X(t)dt should be C/s times LT(X(t)):
                        C/s * 'laplace(X(t),t,s)
   [wxMaxima: comment end   ] */
/* [wxMaxima: input   start ] */
(assume(s>0), lti1: laplace((C*integrate(X(t),t)),t,s));
/* [wxMaxima: input   end   ] */
/* [wxMaxima: comment start ]
Laplace Transform of 1/C times Integral of X(t)dt should be 1/Cs times LT(X(t)):
                        1/(C*s) * 'laplace(X(t),t,s)
   [wxMaxima: comment end   ] */
/* [wxMaxima: input   start ] */
(assume(s>0), lti1: laplace((1/C*integrate(X(t),t)),t,s));
/* [wxMaxima: input   end   ] */
/* [wxMaxima: comment start ]
Constants, C or 1/C should be pulled out in front of LT. 
Ok. integral needs to be one-sided definite instead.
   [wxMaxima: comment end   ] */
/* [wxMaxima: input   start ] */
(assume(s>0), lti2: laplace((C*integrate(X(t),t,0,inf)),t,s));
/* [wxMaxima: input   end   ] */
/* [wxMaxima: comment start ]
Result should be: C/s * 'laplace(X(t),t,s), not C/s * one-sided integral of X(t)dt...
Try specint next:
   [wxMaxima: comment end   ] */
/* [wxMaxima: input   start ] */
(assume(s>0), lti3: specint(C *'integrate(X(t)*exp(-s*t),t,0,inf),t));
/* [wxMaxima: input   end   ] */
/* [wxMaxima: comment start ]
Again, constant C should be pulled out in front. Result should be C/s * LT(X(t))...
   [wxMaxima: comment end   ] */
/* [wxMaxima: comment start ]
Now, substitute correct result for lti2. Manual fix is possible:
   [wxMaxima: comment end   ] */
/* [wxMaxima: input   start ] */
lti2: subst('laplace(X(t),t,s),integrate(X(t),t,0,inf),lti2);
/* [wxMaxima: input   end   ] */

Attachments:

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-02 19:45:31 Created by robert_dodier on 2014-07-04 06:52:56 Original: https://sourceforge.net/p/maxima/bugs/2712/#518c


Diff:


--- old
+++ new
@@ -1,3 +1,4 @@
+~~~~
 /* [wxMaxima: title   start ]
 Laplace Transform of integral (in source domain) bugs
    [wxMaxima: title   end   ] */
@@ -48,3 +49,4 @@
 /* [wxMaxima: input   start ] */
 lti2: subst('laplace(X(t),t,s),integrate(X(t),t,0,inf),lti2);
 /* [wxMaxima: input   end   ] */
+~~~~
rtoy commented 4 months ago

Imported from SourceForge on 2024-07-02 19:45:33 Created by robert_dodier on 2014-07-04 06:52:57 Original: https://sourceforge.net/p/maxima/bugs/2712/#aa0c


Enclosing input file content in 4 tildes to show it is code.