cancel
Showing results for 
Search instead for 
Did you mean: 
Ciro_Bruno
Level 4
137 122 6 17
Message 1 of 13
2,963
Flag Post

Solved!

[HP Prime] Inverse Laplace returning Dirac(x).

HP Recommended
HP Prime
macOS 10.13 High Sierra

Dear sirs

 

I've been facing an issue that returns Dirac(x) instead of inverting Laplace form.

 

I've already consulted this forum, but the given solucion couldn't solve it this time:

Hp Prime Graphing Calculator ilaplace transform issue

 

HP Prime Dirac 01.png

 

The solution isn't so hard to find by hand. It's the one I've asked to transform just after:

 

HP Prime Dirac 02.png

 

Every time I ask "ilaplace" I get Dirac(x).

 

What should I do?

 

Is it possible to disable Dirac operand? I've got no use for it!

 

Thank you.

Regards,

Ciro.

0 Kudos
12 REPLIES 12
Tim_Wessman
Level 8
Level 8
747 744 121 187
Message 2 of 13
Flag Post
HP Recommended

purge(x)

 

Try again.

 

If that doesn't do it, go in the home screen and type "x". If it returns something, you have an "x" variable in a source file, or defined as a user variable, etc. You are getting a correct result since you have x defined!

TW

Although I work for the HP calculator group as a head developer of the HP Prime, the views and opinions I post here are my own.
0 Kudos
Ciro_Bruno
Author
Level 4
137 122 6 17
Message 3 of 13
Flag Post
HP Recommended

It looks like X and x are empty:

 

HOME modeHOME mode

CAS modeCAS mode

 

I'd appreciate your support for solving it.

 

Thank you.

Regards,

Ciro.

0 Kudos
Ciro_Bruno
Author
Level 4
137 122 6 17
Message 4 of 13
Flag Post
HP Recommended

@Tim_Wessman wrote:

purge(x)

 

Try again.

 

If that doesn't do it, go in the home screen and type "x". If it returns something, you have an "x" variable in a source file, or defined as a user variable, etc. You are getting a correct result since you have x defined!


Hello @Tim_Wessman

 

Now it's ok.

 

I had already purged x, y, s and t. Had also restarted CAS and deleted CAS Variables in "Mem" catalog.

 

I found the issue in the active App. In Function App there was F1(X) checked. As I've unchecked it, ilaplace has worked fine.

 

I'm afraid every CAS function may suffer the influence of the active App. Is it true? Is there somehow to set NO App active?

 

Thank you very much.

Regards,

Ciro.

0 Kudos
Tim_Wessman
Level 8
Level 8
747 744 121 187
Message 5 of 13
Flag Post
HP Recommended

Hello,

 

No, there is always an active application. I seriously doubt that having FUNCTION open would impact things here - UNLESS you have a variable defined in the function app.

 

I just looked at your original question again, and I'm not sure what you are concerned about. The result being returned IS the correct answer.

 

http://www.wolframalpha.com/input/?i=inverselaplace(((2*s%2B13)%2F(s%5E2%2B4*s%2B13)),x)

TW

Although I work for the HP calculator group as a head developer of the HP Prime, the views and opinions I post here are my own.
Ciro_Bruno
Author
Level 4
137 122 6 17
Message 6 of 13
Flag Post
HP Recommended

Hello Tim

 

I guess you've seen my screenshots before. I realy have purged and restarted variables and it kept answering "Dirac(x)". Just after ensuring all functions unchecked, it has started working as expected. It's possible that I've done something else meanwhile, but now I couldn't tell anymore what it could be.

 

Now, talking about the Laplace transform, I don't know how Dirac could be useful for me. My use of Laplace transform is to apply its operand to shift a time based function into a frequency based function. The inverse Laplace transform shifts it back to a time based function, which I use to tell what certain circuit does.

 

It always works fine in paper an now it's working fine in HP Prime as well, even if I can't explain why.

 

This function has started in a second order ODE, that must be expressed as a transfer rate equation (output/input). Both sides of ODE have been transformed, solved and then inverse transformed. At the end, to simplify the answer format, SIN and COS have been vectorially combined in a single SIN function, since the input signal in original ODE had been expressed with a SIN.

 

IMG_6363lr.jpg

 

On HP Prime: I've started with the raw Laplace transform, trying to get its inverse. As it didn't return a result without "s" operand and with a Dirac, I couldn't use it as a time based transfer rate equation. So, I grab my result (from paper) and asked HP Prime to give me its Laplace transform. Bingo, the original Laplace equation appeared as answer. Nevertheless, taking this result itself and asking for inverse Laplace transform, I didn't get the original equation back, but the "s" based +Dirac answer.

 

Now it works. I can use laplace() and ilaplace() forwards and backwards properly.

 

Laplace 01.png

 

I'm realy curious to understand what happened. If it happens again, I'd like to be able to solve it once more.

 

Thank you.

Regards,

Ciro.

 

0 Kudos
Ciro_Bruno
Author
Level 4
137 122 6 17
Message 7 of 13
Flag Post
HP Recommended

Tim, I guess I found the issue.

 

I found it strange the result in WolframAlpha. You've placed a ",x" declaration at the end. This called my attention for the relevance or "Var" and "ilapVar" on this issue.

 

Returning to WolframAlpha and declaring ",s,x", there it is...

 

http://www.wolframalpha.com/input/?i=inverselaplace(((2*s%2B13)%2F(s%5E2%2B4*s%2B13)),s,x)

 

Then in HP Prime, testing ilaplace() again with "s" as independent argument, there is "Dirac(x)" again. But declaring "Var" and "ilapVar" as ",s,x", the result becomes OK again:

 

Laplace 02.png

 

My conclusion is... (please correct me) the issue regards on "s" variable, unless it is properly declared who are the variables ("Var" and "ilapVar"). When using "x" as Var, there might be no need for declaration, since it may be default variable for this function.

 

Can I assume it as true? Would it be a correct advise to my students?

 

Thank you

Regards

 

0 Kudos
Tim_Wessman
Level 8
Level 8
747 744 121 187
Message 8 of 13
Flag Post
HP Recommended

That is probably the case (I have not looked at the source). A lot of CAS functions make an assumption with a default variable of x.

TW

Although I work for the HP calculator group as a head developer of the HP Prime, the views and opinions I post here are my own.
Ciro_Bruno
Author
Level 4
137 122 6 17
Message 9 of 13
Flag Post
HP Recommended

It has been a challenge...

 

This issue has been a good example of how dangerous it is being lazy on such "small" details. I've seen it working before, probably always with "x" variable, disregarding the background syntax defaults. I've got used to ignore the declaration of "Var" and "ilapVar". I won't make this mistake again! Next time I want to be lazy again, I must make sure I know where I step on.

 

If you don't bother, I intend to mark my last post as solution for this topic, since it summarizes the conclusion.

 

Thank you for checking screenshots, algebra and so on.

 

Regards,

Ciro.

0 Kudos
Maké
Level 9
3,551 3,490 180 541
Message 10 of 13
Flag Post
HP Recommended

Hi!, @Ciro_Bruno :

 

See, this video ... https://www.youtube.com/watch?v=fg-J3eqhBc4

 

Too, this examples and solution's ... http://tutorial.math.lamar.edu/Classes/DE/InverseTransforms.aspx

Kind Regards !.
Have a nice day !.
@Maké (Technical Advisor Premium - HP Program Top Contributor).
Provost in HP Spanish Public Forum ... https://h30467.www3.hp.com/
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation