Post Reply 
Seed values Solving non linear equations
09-19-2018, 03:04 AM
Post: #1
Seed values Solving non linear equations
Hello

I always struggle to solve non linear equations on my HP Prime when I need to enter Seed values.

For example I am trying to solve the equations I=0.02898*D^4 and 52000 = (106.4*(D/2))/I

Now I cannot find a solution with the solve App unless I enter a Seed value for I and D that very close to the Solutions. Solving the two equations on Wolfram alpha works fine and... I=0.000335618 D=0.328047.

Is there a way to solve non linear equations using the HP prime. I know I can just simplify it down to one equation and use the solve function but i would like to know how to solve non linear systems without having to use a seed value that is extremely close to the actual solution.
Find all posts by this user
Quote this message in a reply
09-19-2018, 10:06 PM
Post: #2
RE: Seed values Solving non linear equations
Have you tried fsolve:

fsolve([ii = (0.02898*d^4),52000 = 106.4*d/2/ii],[ii,d])

-road
Find all posts by this user
Quote this message in a reply
09-19-2018, 11:28 PM (This post was last modified: 09-19-2018 11:29 PM by Carsen.)
Post: #3
RE: Seed values Solving non linear equations
Welcome the the HP Forums John9!

Check out the Solve command in the Solve menu located in the CAS section of the toolbox. You can read the syntax, details, and examples on the Solve command with the [Help] key. Just highlight the command you want to learn more about in the menu and press [Help].

Observe how I write the two equations in the solve command. Notice how I use an array to combine the two equations and the two variables (i.e. The set of non-curly brackets that can be accessed via [Shift] 5). This is the way to go. I use the variable 'ii' instead of 'i' because 'i' gets translated to the imaginary number symbol. Make sure to use lowercase letters in the equation too because uppercase letters have numbers stored in them.

Does my explanation make sense? Let me know how solving your equation goes.

Edit: I forgot to upload the screenshot lol.


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
09-20-2018, 09:20 AM
Post: #4
RE: Seed values Solving non linear equations
(09-19-2018 03:04 AM)John9 Wrote:  Hello

I always struggle to solve non linear equations on my HP Prime when I need to enter Seed values.

For example I am trying to solve the equations I=0.02898*D^4 and 52000 = (106.4*(D/2))/I

Now I cannot find a solution with the solve App unless I enter a Seed value for I and D that very close to the Solutions. Solving the two equations on Wolfram alpha works fine and... I=0.000335618 D=0.328047.

Is there a way to solve non linear equations using the HP prime. I know I can just simplify it down to one equation and use the solve function but i would like to know how to solve non linear systems without having to use a seed value that is extremely close to the actual solution.

I guess you have to use the numeric solver (fsolve).
On the Prime you have separate symbolic and numeric solver (solve and fsolve, respectively), unlike the Nspire.
Best,

Aries Wink
Find all posts by this user
Quote this message in a reply
09-20-2018, 05:02 PM
Post: #5
RE: Seed values Solving non linear equations
The reason the solver app is having trouble is that there is a discontinuity at I=0. The solution is very close to 0 so it needs a starting point very close to the solution.

If you change your second equation to:

I = (106.4*(D/2))/52000

the discontinuity is removed and the solver app has no problem finding two solutions at [[3.35617752293e−4,0.328047427054]] and at [[0,0]]

-road
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: