Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
5  
Why do you use Excel if you have Mathematica at hand? –  grbl Dec 17 '13 at 16:50
    
1  
related –  cormullion Dec 17 '13 at 18:10
    
@belisarius Thank you! The function solver in Excel was exactly what I was looking for. –  Hughie Chan Dec 21 '13 at 22:58

1 Answer 1

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
share|improve this answer
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 3: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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.