I define the function:

 w[q_, n_, a_] := q/(4 Pi n r^2) (1 - Exp[-2 r/a] (2 (r/a)^2 + 2 (r/a) + 1))

I then want to solve:

 q = 1.6*10^(-19);
 n = 8.85*10^(-12);
 a = 0.529*10^(-10);
 Solve[w[q, n, a] == 1000, r]

This does not work and I do not understand why. I think there is a solution. Any ideas?


Use Reals option with Solve since you did not use exact numbers. You'll get an answer (also with Solve::ratnz) along with it

Solve[w[q, n, a] == 1000, r, Reals]

Mathematica graphics

  • $\begingroup$ Thank you. You show NSolve, but Solve works. Why does your display show the result in that long form as opposed to mine showing it in scientific notation? $\endgroup$ – Amzoti Oct 31 '13 at 5:50
  • $\begingroup$ @Amzoti sorry, copied the wrong command. It is Solve, not NSolve. I tried NSolve earlier also to see what it does. But ended up using Solve with Reals. $\endgroup$ – Nasser Oct 31 '13 at 5:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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