0

I am still a beginner and do not fully understand pure functions and root objects. When I tried to calculate the inverse of a function, Mathematica gave me:

f[B_] :=
  -744.790486 + 
  559.361126 Root[-247818634 - 2500 B + 796044875 #1 - 1032864500 #1^2 + 
    675444825 #1^3 - 222213025 #1^4 + 29396850 #1^5 &, 1] -
  0.468197 Root[-247818634 - 2500 B + 796044875 #1 - 1032864500 #1^2 + 
    675444825 #1^3 - 222213025 #1^4 + 29396850 #1^5 &, 1]^2

Mathematica has no problems evaluating f[B] once B is defined. Simple equations can be easily converted into an Excel-friendly format, but this isn't exactly a simple equation.

My question: Is it possible to format this in a way that Excel can generate the same result as Mathematica, or is this simply beyond the scope of what is achievable with Excel?

m_goldberg
  • 107,779
  • 16
  • 103
  • 257

1 Answers1

2

Your Root objects look like this:

r = Root[-247818634 - 2500 B + 796044875 #1 - 1032864500 #1^2 + 
          675444825 #1^3 - 222213025 #1^4 + 29396850 #1^5 &, 1]

and have both the parameter B and slot #1. One way to make this more Excel-friendly would be to change the slots into a variable like x:

First[r][x]
-247818634 - 2500 B + 796044875 x - 1032864500 x^2 + 675444825 x^3
                    - 222213025 x^4 + 29396850 x^5
bill s
  • 68,936
  • 4
  • 101
  • 191
  • 1
    Can Excel actually find the roots to high precision without numerical problems? I had the impression that Excel was a disaster waiting to happen for this sort of thing, just due to horrible numerics implementation. – Oleksandr R. Dec 18 '13 at 03:03
  • It wasn't able to find the roots to high precision, but thankfully it was accurate enough for my purposes. – Hughie Chan Dec 21 '13 at 22:54