0

I used Solve to get the inverse function of a polynomial. The result I get contains slots. I do not understand what that means or how to work with it. Here is what I have.

poly = 
  208.5932` + 0.3751773` px + 0.00003837606` px^2 - 
  1.304226`*^-8 px^3 + 5.021461`*^-12 px^4 - 9.522892`*^-16 px^5
res = Solve[lambda == poly && px > 500 && px < 1700, px, Reals]

with

{{px -> 
   ConditionalExpression[
     Root[-1.10053*10^60 + 5.27598*10^57 lambda - 1.97943*10^57 #1 - 
           2.02471*10^53 #1^2 + 6.88107*10^49 #1^3 - 2.64931*10^46 #1^4 + 
           5.02426*10^42 #1^5 &, 2], 
     404.43 < lambda < 921.643]}}

I have seen a lot of options in the Solvereference (use of Exist...). However, I could not make it usable for my case. Can someone improve the solution or explain what the slots are about?

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
Eisbär
  • 1,476
  • 7
  • 14

1 Answers1

1

Your solution is a Root object with constraints on its domain. You can use it like any other function as long as you honor the constraint on the independent variable.

Clear[pxF]
pxF[lambda_] = 
  Solve[lambda == poly && px > 500 && px < 1700, px, Reals][[1, 1, 2]]

Then

pxF[500] 

732.211

poly /. px -> 732.2113549706908`

500.

Plot[pxF[x], {x, 300, 1000}]

plot

Note that pxF will not plot outside of its domain 404.43 < lambda < 921.643.

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
  • Thank you for answering clearly. I was worried about the solution above as there were slots ans the variable mixed. If the slot is equal to lambda I would have expected only one of it. – Eisbär Jul 31 '17 at 06:13