0
$\begingroup$

I am trying to solve a set of non linear equation but using the function nsolve but mathematica is not giving me proper answer. The code is given below.

h = 0.8;
\[Epsilon]r = 2.94;
ae = 5;

The Equations are given below.

Equation Number 1....

1/we = (120*\[Pi])/(ae (w/h + 1.393 + 0.667*Log[w/h + 1.44]));

Equation Number 2....

1/we = (4.38/
ae)*(E^((-0.627*\[Epsilon]r)/(((\[Epsilon]r + 1)/
  2) + (\[Epsilon]r - 1)/2 + 1/Sqrt[(1 + (12*h)/w)])));

Nsolve for solving both equations for "we" and "w" simultaneously.

NSolve[{1/we == (120*\[Pi])/(
ae (w/h + 1.393 + 0.667*Log[w/h + 1.44])), 
1/we == 4.38/
ae*(E^((-0.627*\[Epsilon]r)/(((\[Epsilon]r + 1)/
   2) + (\[Epsilon]r - 1)/2 + 1/Sqrt[(1 + (12*h)/w)])))}, {we, 
w}, Reals]

I am not getting any solution for the above equations using NSOLve.

$\endgroup$
3
  • $\begingroup$ NSolve deals primarily with linear and polynomial equations. In your case you might have more luck using e.g. FindRoot with an adequate estimate of the solution values. $\endgroup$
    – MarcoB
    Jun 8, 2015 at 5:02
  • 1
    $\begingroup$ Using {{w, 100}, {we, 2}} for the starting values should do it with FindRoot as recommended by MarcoB. $\endgroup$
    – JimB
    Jun 8, 2015 at 5:17
  • 1
    $\begingroup$ @JimBaldwin , I used the Find Root Method with the code given below .FindRoot[{1/we == (120*\[Pi])/( ae (w/h + 1.393 + 0.667*Log[w/h + 1.44])), 1/we == (4.38/ ae)*(E^((-0.627*\[Epsilon]r)/(((\[Epsilon]r + 1)/ 2) + (\[Epsilon]r - 1)/2 + 1/Sqrt[(1 + (12*h)/w)])))}, {{w, 100}, {we, 2}}] But that gives me some dimension related error . $\endgroup$
    – AK K Khan
    Jun 8, 2015 at 6:47

1 Answer 1

2
$\begingroup$

Using the starting value {w,100} and setting both sides equal (we can ignore the reciprocal 1/we) and then solve for w first. Apologies to Jim and MarcoB, this is a rip answer to clean things up.

h = 0.8;
\[Epsilon]r = 2.94;
ae = 5;

eqn = (120*\[Pi])/(ae (w/h + 1.393 + 0.667*Log[w/h + 1.44])) == 
(4.38/ae)*(E^((-0.627*\[Epsilon]r)/(((\[Epsilon]r + 1)/
        2) + (\[Epsilon]r - 1)/2 + 1/Sqrt[(1 + (12*h)/w)])));

FindRoot[eqn, {w, 100}] (* Gives  w -> 106.761 *)
1/(eqn[[1]] /. w -> 106.761) (* Implies we is 1.83182 *)
$\endgroup$
2
  • $\begingroup$ @Histograms...Thanks for your answer..This was really helpful. $\endgroup$
    – AK K Khan
    Jun 8, 2015 at 8:26
  • $\begingroup$ No need to apologize. Thank you for writing this up! $\endgroup$
    – MarcoB
    Jun 8, 2015 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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