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.

Considering the equation

a*x^3 + a*x^2 + x + b == 0

I'm looking to find the best value for a and x from the above polynomial (with b known) for which the second function using the same a and x

(65 + 103*a*x^2)/(1 + a*x^2)

gives me the closest NonlinearModelFit for an already determined set of (x,y) coordinates.

share|improve this question
    
If you fit your data to the model you get an expression for a. If you use that in the first equation you can than Solve or NSolve that for x. The phrasing of your question seems rather peculiar to me. If you have determined a using the fit you cannot use the first equation to determine a again as you seem to suggest. –  Sjoerd C. de Vries May 28 '13 at 20:43

1 Answer 1

data = {{0, 64.88916615388398`}, {1, 83.24718374138278`}, {2,
 93.75766523300271`}, {3, 99.74735460092744`}, {4, 
101.22704834518477`}, {5, 105.38706473218782`}, {6, 
100.10310736034148`}, {7, 104.83229572643938`}, {8, 
103.76491949073773`}, {9, 105.68123555532274`}, {10, 
99.70060366431277`}};

sol =  NonlinearModelFit[data, (65 + 103*a*x^2)/(1 + a*x^2), {a}, x]["BestFitParameters"]

{a -> 0.951042699}

Solve[a*x^3 + a*x^2 + x + b == 0 /. sol /. b -> 1, x]

{{x -> -1.}, {x -> 0. - 1.02541577 I}, {x -> 0. + 1.02541577 I}}

share|improve this answer

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.