Student Support Forum: 'Numerically solve coupled equations' topicStudent Support Forum > General > "Numerically solve coupled equations"

 Next Comment > Help | Reply To Topic
 Author Comment/Response Daniel 10/17/12 4:23pm I have three coupled implicit equations which I would like to solve numerically. The implicit equations may yield complex results, in general, and I need to discard the negative root and calculate only with the positive one. Here is what I have so far: \[CapitalDelta] := 4 Ux := 1 Uy := 1 + \[CapitalDelta]/3 Uz := 2 \[CapitalDelta] e1 := 0.5 e2 := 12 f1 := 0.5 f2 := 1 - f1 Da := 1/(4*\[Pi])* NIntegrate[(Sin[\[Theta]]^3*Cos[\[Phi]]^2)/(Ux^2*\[Rho]), {\[Phi], 0, 2 \[Pi]}, {\[Theta], 0, \[Pi]}] Db := 1/(4*\[Pi])* NIntegrate[(Sin[\[Theta]]^3*Sin[\[Phi]]^2)/(Uy^2*\[Rho]), {\[Phi], 0, 2 \[Pi]}, {\[Theta], 0, \[Pi]}] Dc := 1/(4*\[Pi])* NIntegrate[(Sin[\[Theta]]*Cos[\[Phi]]^2)/(Uz^2*\[Rho]), {\[Phi], 0, 2 \[Pi]}, {\[Theta], 0, \[Pi]}] \[Rho] := ((Sin[\[Theta]]^2*Cos[\[Phi]]^2*eff1)/ Ux^2 + (Sin[\[Theta]]^2*Sin[\[Phi]]^2*eff2)/ Uy^2 + (Cos[\[Phi]]^2*eff3)/Uz^2) sols1 := eff1 /. NSolve[f1 ((e1 - eff1)/(1 + Da*(e1 - eff1))) + f2 ((e2 - eff1)/(1 + Da*(e2 - eff1))) == 0 && 20 > Re[eff1] > 0, eff1] sols2 := eff2 /. NSolve[f1 ((e1 - eff2)/(1 + Db*(e1 - eff2))) + f2 ((e2 - eff2)/(1 + Db*(e2 - eff2))) == 0 && 20 > Re[eff2] > 0, eff2] sols3 := eff3 /. NSolve[f1 ((e1 - eff3)/(1 + Dc*(e1 - eff3))) + f2 ((e2 - eff3)/(1 + Dc*(e2 - eff3))) == 0 && 20 > Re[eff3] > 0, eff3] sol = Solve[{sols1, sols2, sols3}, {eff1, eff2, eff3}] The last line is obviously what I would like to calculate, but it does not work since "the integrand in the 'D's has evaluated to non-numerical values" URL: ,

 Subject (listing for 'Numerically solve coupled equations') Author Date Posted Numerically solve coupled equations Daniel 10/17/12 4:23pm Re: Numerically solve coupled equations Bill Simpson 10/18/12 00:48am Re: Numerically solve coupled equations Daniel 10/23/12 01:29am
 Next Comment > Help | Reply To Topic