cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

How to calculate laplace of integral?

Dean
1-Visitor

How to calculate laplace of integral?

laplace.gif

9 REPLIES 9
Werner_E
25-Diamond I
(To:Dean)

Unfortunately Mathcad can't do what you demand.

BTW, the answer should NOT be v(s)/s - you should use a different name for the laplace transform of a function, maybe V(s)/s

Dean
1-Visitor
(To:Werner_E)

So, MC can't solve these type of problems? Do you know of a program that can be used for something like this?

Thanks for your help.

Werner_E
25-Diamond I
(To:Dean)

I can't see a concrete problem. Mathcad can do it for concrete functions but unfortunately not for general integrals or derivatives. The latter is especially bad as it would mean manual copy/paste/substitution if you would use the laplace transform to solve an ODE symbolically.

Other programs which come to my mind are Mathematica and Maple or you may even use the free wolfram alpha:

http://www.wolframalpha.com/input/?i=laplacetransform%28int%28v%28t%29%2Ct%29%29

I am not sure about the free Maxima in that respect, you would have to give it a try.

Dean
1-Visitor
(To:Werner_E)

I tried MATLAB but get this:

>> laplace(int(v,t), t, s)

ans =

v/s^2

I am not sure if I am entering the problem correctly. Any other way gives an error.

Werner_E
25-Diamond I
(To:Dean)

Dean wrote:

I tried MATLAB but get this:

>> laplace(int(v,t), t, s)

ans =

v/s^2

This is because v is treated as a constant. You get the same result with Mathcad

lapl1.png

I am not well versed with Matlab, but did you try

syms f(t) s

laplace(int(f(t), t), t, s)

But then, as Mathcad and Matlab use the same symbolic engine (muPad), I would expect same results in both programs - so you would have to use a definite integral (see below).

You can get Mathcad to do the transform of the integral (nearly) the way you expected and retrospective it seems logical that you have to use a definite integral:

lapl2.png

laplace(v(t),t,s) would have to be replaced with V(s) or something like that.

Its the same with a derivative

lapl3.png

To solve an ODE you would have to replace laplace(v(t),t,s) by a variable, lets say V, solve for it and the use invlaplace

Dean
1-Visitor
(To:Werner_E)

ML doesn't like that:

>> syms f(t) s

??? Error using ==> syms at 61

Not a valid variable name.

I also thought that it may be necessary to use a definite integral first.

I will try your last suggestion.

Werner_E
25-Diamond I
(To:Dean)

It works for the definite integral as it does for the derivative.

What annoys me is the fact, that I cannot make the replacement laplace(f(t),t,s)=F(s) automatically with substitute. Also it does not work to define a dummy function named laplace which returns a dummy variable because laplace() is a function of the symbolic processor, not of mathcad. The symbol processor which was used before it was changed for muPad ca. 6 years ago was Maple and could evaluate laplace(). For muPad it seems to be an empty placehoder function only.

So I cannot create a sheet for automatic ODE solution, I will always have to do the substitution manually

ad Matlab: http://stackoverflow.com/questions/5284457/how-to-find-laplace-of-intxt-t-0-t-in-matlab

Dean
1-Visitor
(To:Werner_E)

That is good information in your link!

Werner_E
25-Diamond I
(To:Dean)

Dean wrote:

That is good information in your link!

Yes, the trick in Matlab is to use muPad syntax directly. Matlab seems to allows this, but Mathcad not.

Up to version 11 of Mathcad you could use Maple syntax, too, when doing symbolics and could do some nice things which would not have been possible with plain Mathcad. They cancelled that with version 12 and Mathcad would not reach over undocumented commands to the symbol processor.

Announcements

Top Tags