The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

HP PRIME - What is the fastest way...
Message #1 Posted by dg1969 on 19 Oct 2013, 10:02 a.m.

From CAS view I want to calculate the inverse transform Laplace of a function...

invlaplace(1/(1+0.2*x+x^2) for example... It's Ok I have a blablabla function of small x as a result. Good! BUT... :

I need to place a big X in place of small x for future copy/paste in the symb view F1(X)=blabla of X and then plotting these...

invlaplace(1/(1+0.2*x+x^2),x='X') doesn't work

subst template or subst(blabala of x, 'X') doesn't work

What is the fastest way... Assuming you have a long function of small x as a result in CAS view How to transfer it in F1(X)= on symb function view ?

Edited: 19 Oct 2013, 10:04 a.m.

      
Re: HP PRIME - What is the fastest way...
Message #2 Posted by Harold A Climer on 19 Oct 2013, 10:14 a.m.,
in response to message #1 by dg1969

Quote:
From CAS view I want to calculate the inverse transform Laplace of a function...

invlaplace(1/(1+0.2*x+x^2) for example... It's Ok I have a blablabla function of small x as a result. Good! BUT... :

I need to place a big X in place of small x for future copy/paste in the symb view F1(X)=blabla of X and then plotting these...

invlaplace(1/(1+0.2*x+x^2),x='X') doesn't work

subst template or subst(blabala of x, 'X') doesn't work

What is the fastest way... Assuming you have a long function of small x as a result in CAS view How to transfer it in F1(X)= on symb function view ?


I think X is a system variable. See Joe Horns list of system variables on his web page or in the thread about PRIME VARIABLES
      
Re: HP PRIME - What is the fastest way...
Message #3 Posted by Tim Wessman on 19 Oct 2013, 11:24 a.m.,
in response to message #1 by dg1969

Remember to quote your variable.

Note that you can't do invlaplace(1/(1+0.2*x+x^2))|x='X' directly as that will evaluate to something * Dirac(x) since the substitution happens first. You need to do it as a two step.

invlaplace(1/(1+0.2*x+x^2)) then

<result>|x='X'

As a side note, the Get from Home/CAS was supposed to do a bit of intelligent rewriting to help avoid this type of thing. It fell on the list of "get to it later" though unfortunately. :-(

TW

            
Re: HP PRIME - What is the fastest way...
Message #4 Posted by dg1969 on 19 Oct 2013, 12:06 p.m.,
in response to message #3 by Tim Wessman

Thanks for the quality of your listening Tim,

I've made a mistake in editing my post...

I have first try :

invlaplace(1/(1+0.2*x+x^2),x,'X') with no success...

BUT then I have already try what you suggest :

first command line : invlaplace(1/(1+0.2*x+x^2)) give me a first result :

1.00*SIN(0.99*x)*EXP(-0.1*x) as expected

then second command line :

1.00*SIN(0.99*x)*EXP(-0.1*x)|x='X' with quotes ! And the result is :

0. !!!

The same happen with subst(1.00*SIN(0.99*x)*EXP(-0.1*x),x='X')

I'am in CAS view...

                  
Re: HP PRIME - What is the fastest way...
Message #5 Posted by Tim Wessman on 19 Oct 2013, 12:13 p.m.,
in response to message #4 by dg1969

The decimal numbers are "reals". When you do the where | it evaluates approximately since they are non-exact objects.

You can either click the [a b/c] key to toggle the decimals first before the where, or start with 2/10 in the beginning and it will work.

I'll investigate why a simple substitution is evaluating down. I definitely don't think that should be the case.

TW

                  
Re: HP PRIME - What is the fastest way...
Message #6 Posted by dg1969 on 19 Oct 2013, 12:14 p.m.,
in response to message #4 by dg1969

Here is something strange for me....

In fact what you suggest, Tim, works but only if I use exact terms in the original Laplace form :

first command :

invlaplace(1/(1+(2/10)*x+x^2)) 2/10 in place of 0.2 !!

and then ExactFirstResultOf(x)|x='X'

do the job !!

Can you comment these ?

Thanks for your help

EDIT : Tim you give the answer before I place this last post !! ;o) !

Edited: 19 Oct 2013, 12:36 p.m.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall