How to get all solutions to e^x=1 - 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: How to get all solutions to e^x=1 (/thread-22316.html) |
How to get all solutions to e^x=1 - townba - 09-12-2024 04:08 AM I'm having trouble trying to find how to get the Prime to fully solve e^x=1. Complex is on, Principal is off. When I try solve(sin(x)=0), I get {n_0*π}, which I expect. However, when I try solve(e^x=1), I get {0} instead of something like {2*i*n_0*π}. (For comparison, the HP 50g solves e^x as 2·i·π·n1.) Is there a different function I should use? RE: How to get all solutions to e^x=1 - townba - 09-16-2024 04:34 AM I downloaded the source code for Giac and took a look. Looks like the n_0 approach is only used for trigonometric functions, so I'm not sure this is possible without a change to the CAS. I hacked in a solution in solve.cc: Code:
It works, though its output can be unwieldy for non-simplistic cases. (I suppose this could be true of the trig functions as well.)
I think this could be a nice approach, though this behavior change could be surprising. It might need a separate configuration setting and other work for it to be generally acceptable. |