Message Boards Message Boards

0
|
7338 Views
|
10 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Laplace Transform not working

Posted 10 years ago

I am working on a green's function program to solve PDE's with the DiracDelta function in it. I am using it for some student's and it work's for ODE's but not PDE"S. Can someone tell me why the following is happening. The function g''[x] is obviously a function of x and not t. If you were doing it by hand you can forget integration by parts. When I enter this LaplaceTransform[g''[x], t, s] I get this g''[x]/s Obviously the s should not be on the bottom. Why am I getting this. Same for the first derivative. Enter LaplaceTransform[g'[x], t, s] I get this g'[x]/s still has the s on the bottom. It works if g is a function of t LaplaceTransform[g'[t], t, s] is, -g[0] + s LaplaceTransform[g[t], t, s] which is correct, but now we have g[t] and not g[x]. Since I am writing a program I need the Laplace transform to know the difference.

POSTED BY: Russell Barry
10 Replies

By the way the fourier transform works. It is also an exponential function. FourierTransform[g'[x], t, w] g[x] is Also a function of x not t

Sqrt[2 [Pi]] DiracDelta[w] ][g]'[x] The g'[x] is still there and If you can remember the defination of the diracdelta function, this is right and still leaves the g'[x]

I was trying to get an answer similar to this one for the laplace transform. Only the dirac delta would be the laplace transform.

Thanks to both of you, Have a good day

POSTED BY: Russell Barry

You understood. Your third line is the one that gives the problem. It is treating any derivative except the one with respect to t as one. Now, I know what is happening. You can put in the derivative of x'''''''''''[x] and it still gives 1/s. I now see what the problem is. You, without my help were able to see what is happening. I know what is happening. I now think I know what to do. You got me started on the right path, thanks so much!

Thanks again, Russell Barry

POSTED BY: Russell Barry

Thanks I will learn how to post this. I started to realize that in order to explain this one I have a bigger problem than just mathematica. I think the person would also have to understand green's functions. I can do them by hand but not with Mathematica and the answer to the problem is easy if you understand green's functions. I do not know if I should go to the mathematics site or the physics site. You have f'[x]e^xs, you can get f[x] by integration by parts. It puts the derivative with respect to x on the e^sx and you get f[x] by itself. So you get -sf[x]e^xs so you now have f[x] by itself, with no derivatives on it. If you have f'[x]e^ys you cannot do an integration by parts, since the derivative of e^ys with respect to x is zero. So the laplace transform e^ys just stays there. If I can get someone to understand this is where the problem is, maybe they can help me. Mathematica should leave it alone, since you do not want to do a integration by parts, which gives 0. But it leaves (f'[x]e^ys)/s...[I will call a] and it is a problem with mathematica I do not understand. In other-words you have done nothing to the function or the exponential but mathematica puts in 1/s and nothing has been done to that part of the equation. David can you lead me in the right direction. It is like asking mathematica not to take a derivative by it gives and extra x or what ever variable.

POSTED BY: Russell Barry

The function "LaplaceTransform" takes three arguments. The first argument is the expression to be transformed. The second is a symbol which indicates the independant variable of the first expression. The third is a symbol to be used in the output. If we take a look at your example,

LaplaceTransform[g''[x], t, s]

we see that the expression is g''[x] and the independant variable of it is "t". The expression g''[x] is a constant with respect to "t" and that's why you get that result. Ignoring the subtilies of analysis for a bit, the input:

LaplaceTransform[expr, t, s]

Is basically just:

Integrate[expr Exp[-s t], {t, 0, Infinity}]

If your expression "expr" doesn't have the variable of integration in it, then it's basically just a constant as far as the function "LaplaceTransform" is concerned.

If you are still seeing issues, try writing it out as an integral using the Integrate command. I think seeing that would help us better understand what you're looking to do.

POSTED BY: Sean Clarke
Posted 10 years ago

However, if I read your post correctly, I think LaplaceTransform is working correctly, in that the Laplace transform of 1 is 1/s.

In[1]:= LaplaceTransform[g'[t], t, s]

Out[1]= -g[0] + s LaplaceTransform[g[t], t, s]

In[2]:= LaplaceTransform[g'[x], t, s]

Out[2]= Derivative[1][g][x]/s

In[3]:= LaplaceTransform[1, t, s]

Out[3]= 1/s
POSTED BY: David Keith
Posted 10 years ago

Hi Russel, A nice write-up on posting can be found here How to post including how to put Mathematica code in your post.

Kind regards, David

POSTED BY: David Keith

Thank's anyway, I really appreciate you trying to help.

POSTED BY: Russell Barry

I need to learn to do post's better because I cannot explain myself, until I can show the equations. The same thing would be true for a fourier transform. I can do it by hand but not with mathematica. I should not get the 1/s, if the variable is not t. It is like the partial derivative I did above where you hold y constant. You can take a laplace transform with respect to another variable and it has no effect but to leave the laplace transform. In order to do the laplace transforms you have to do a integration by parts, but if the variable is not the one you are taking the derivative of, you just leave it and do not do the integration by parts. I will have to learn the editor better. I could explain it so easy if I could just write out equations. Like I said I can do it by hand, but not mathematica, I do not know where the 1/s comes from, it should not be there. It would be like taking the derivative with respect to x of e^2y, it is zero. I cannot use this editor so I am having real problems communicating. I am really sorry.

POSTED BY: Russell Barry

I understand that. That is not the problem. Let me put it a little better. When you plug in the Laplace Transform you have to do a integration by parts, to take the derivative of the Laplace transform and get the derivative off the Laplace transform. That would bring down one s variable. It should not do anything but add the Laplace transform to the variable g[x]. g''[t] - g''[x] = DiracDelta[x]*DiracDelta[t], taking the laplace transform would give G''[x] - s^2G = DiracDelta[x]e^-st .where G is now the Laplace transform. Notice nothing happened to the first term G''[x] since we took the Laplace transform with respect to t. It is now LaplaceTransorm/dx^2, the second term changed since it is a function of t and the DiracDelta of t changed because it is a function of t. I cannot write it out better because I do not know what format of this editor. It is not a matter of a dummy variable. It is like taking the partial derivative of xy with respect to x, which gives y.

POSTED BY: Russell Barry

I think t is just a dummy variable here for integral. It does not matter whether it is x or t.

LaplaceTransform[g'[t], t, s]

and

LaplaceTransform[g'[x], x, s]

give me the same result.

POSTED BY: Shenghui Yang
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract