HP Forums
Why I get a syntax error on desolve - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Why I get a syntax error on desolve (/thread-20491.html)



Why I get a syntax error on desolve - Anthony The Koala - 09-12-2023 12:11 PM

I am exploring derivatives in the HP Prime.

I solved a 2nd order ode
desolve(4*y''-6*y'+7*y=0)

I successfully get
G_0*cos(1/4*19^0.5*x) + G_1*sin(1/4*19^0.5*x))*exp(3/4*x)

BUT at a later time I solve the same equation.

It now adds the "CAS." before desolve

CAS.desolve(4*y''-6*y'+7*y=0)

I now get
X Error:Syntax Error

Why?

Thank you
Anthony, Sydney


RE: Why I get a syntax error on desolve - roadrunner - 09-12-2023 03:07 PM

What you entered (desolve(4*y''-6*y'+7*y=0)) will work in CAS, but in home this:

CAS(EVAL("desolve(4*y''-6*y'+7*y=0,x,y)"))

will give the same answer.

-road


RE: Why I get a syntax error on desolve - Anthony The Koala - 09-12-2023 08:06 PM

Dear roadrunner,
Thank you for the reply.

When I was in the home screen pressing the "house" button on the left I originally got:

desolve(4*y''-6*y'+7*y=0)

But now when I am in home screen I get Syntax Error.

How do I go back to home screen without getting a syntax error OR the additional CAS.EVAL statement as in:

CAS(EVAL("desolve(4*y''-6*y'+7*y=0,x,y)"))

Thank you
Anthony, Sydney


RE: Why I get a syntax error on desolve - roadrunner - 09-13-2023 12:05 AM

The CAS and EVAL commands are in the toolbox catalog, but i would recommend doing those types of problems in CAS mode to avoid using them. Just press the CAS button that is second down on the left, then type in your original equation.

-road


RE: Why I get a syntax error on desolve - Anthony The Koala - 09-13-2023 01:13 AM

Dear roadrunner,
Thank you.

Entering into the home screen:

CAS(EVAL("desolve(4*y''-6*y'+7*y=0,x,y)"))

Did work!

And thank you about entering the following in CAS mode.

desolve(4*y''-6*y'+7*y=0,x,y)

Again to enter the above command must be in CAS mode.

Thank you
Anthony, Sydney