• ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
The HP Community is where owners of HP products, like you, volunteer to help each other find solutions.
Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
HP Recommended

Hello,

 

I'm trying to solve

 

 solve( (2)^x = (x)^2,x)

 

But the calculator cannot solve or am I doing somthing wrong?.

 

I lost my TI Nspire CX and I though that HP Prime, since is a recent modern version, were able to solve something simple as that, I am wrong. (TI Nspire solved it ).

 

How solve the above equation using the HP Prime? I'm seriusly thinking to return this back.

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
HP Recommended

 

After I played with the calculator I found that it has to be in  CAS environment in order for the solver to work, if the fsolve is used in Home environment it won't work:

 

fsolve(2^x=x^2, x, -10 . . 10) --> [-.76664695962 2. 4.]

 

nSolve worked too, but it doesn't allow an interval.

 

So the solution is that those commands need to be used in the CAS environment.

 

Thanks

 

View solution in original post

6 REPLIES 6
HP Recommended
I got -0.766665695962

That seems to be right.

While I work for HP (Not the Calculater Division) ... I'm only typing for myself here.
HP Recommended

 

Hey good job Dulcimoo!!!

 

Did you find the other two roots? there are three. How much work did you do to get that root? did you use solve(f(x),x) or the zero function? or you just strugle trough bunch of procedures.

 

I realize that HP prime still using HP 50g firmware,  it seems to me that HP Prime is just HP 50g with makeup, I recall I had same issue solving the equation with it.

 

Try: https://www.wolframalpha.com/input/?i=solve%282^x+%3Dx^2%2Cx%29

 

 

HP Recommended

Since you want approximate solutions, use the fsolve command, not the solve command:

 

fsolve(2^x=x^2, x, 0) --> -.766664695962

 

The 0 at the end is the initial guess; the solver looks for a solution close to that.  Instead of an initial guess, you can also specify either an interval or a list within which to find a solution:

 

fsolve(2^x=x^2, x, 1 .. 3) --> [2.]

fsolve(2^x=x^2, x, { 3 5 }) --> [4.]

 

> I realize that HP prime still using HP 50g firmware,  it seems to me that HP Prime is just HP 50g with makeup...

 

No no no, that's not true at all.  None of the 50g firmware is in the Prime.  They had to rewrite everything from scratch, since there is no RPL kernel in Prime.  The math library that's used in the Home environment (for normal number crunching, not solving) was written to obtain the same famous 12-digit BCD accuracy as the 50g, but it was all new code.  However, the solvers and the other CAS operations in Prime are not based on the 50g at all, but are all new, based on the very robust Xcas computer software package.

-Joe-
HP Recommended

 

Good job Joe,

 

I see, fsolve is one way to go, thank you.

 

I think then something is wrong with my calculator or there are some settings hidden somewhere that I need to change.

 

I tried using the fsolve you used, I typed the first equation as you showed ... comes back as "undef"

 

I look for the fsolve in the user guide, it doesn't mention anything about lists anywhere. I tried the other fsolve you mention, with list and interval:

 

fsolve(2^x=x^2, x, 1 . . 3) --> Error: No significant digits in number

 

fsolve(2^x=x^2, x, { 3 5 }) --> undef

 

Actually the space between 3 and 5 is understood as multiplication 3 * 5.

 

Since the last one uses { .. } as list entry and it is not documented in the user guide, I assuming is not implemented in the firmware. Can you point me where did you find that list is one option?.

 

I  tried the example in the user guide:

 

fsolve(cos(x)=x,x,-1..1,bisection_solver) --> Error:Two decimal separators in input

 

Introducing a space after -1 and space between dots and in front last 1 comes back with: Error: No significant digits in number.

 

Well it seems that this calculator is not working well. Joe, do set any flags?

 

Thank you

 

HP Recommended

 

After I played with the calculator I found that it has to be in  CAS environment in order for the solver to work, if the fsolve is used in Home environment it won't work:

 

fsolve(2^x=x^2, x, -10 . . 10) --> [-.76664695962 2. 4.]

 

nSolve worked too, but it doesn't allow an interval.

 

So the solution is that those commands need to be used in the CAS environment.

 

Thanks

 

HP Recommended

Oops!  Quite right.  In general, all symbolic math work should be done in the CAS; that's what it's for.  Home is intended for ordinary number-crunching, not symbolic math.  Sorry for not pointing that out.

-Joe-
Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.