8
$\begingroup$

Bug introduced in 9.0 or earlier and fixed in 10.4.0


Why does this work?

Solve[5 Tan[t] + 9 == 0 && 0 <= t < 2 Pi , t]

{{t -> π - ArcTan[9/5]}, {t -> 2 π - ArcTan[9/5]}}

But this doesn't.

NSolve[5 Tan[t] + 9 == 0 && 0 <= t < 2 Pi , t]

{}
$\endgroup$
  • $\begingroup$ It does work if I do this: NSolve[5 Tan[t]+9==0&&0<=t<2 Pi,t,Complexes]. So you have to allow complex values to get the real solutions. I think that's strange. $\endgroup$ – Jens Oct 15 '15 at 5:22
  • $\begingroup$ NSolve[5 Tan[t] + 9 == 0 && 0 <= t <= 6, t] also works :) $\endgroup$ – Dr. belisarius Oct 15 '15 at 5:27
  • $\begingroup$ NSolve[5 Tan@t + 9 == 0 && 0 <= t <= 2 Pi] Also works ! :=) $\endgroup$ – Dr. belisarius Oct 15 '15 at 5:30
  • 2
    $\begingroup$ The question is out of scope for this site. The answer to this question requires either advice from Wolfram support or the services of a professional magician :) $\endgroup$ – Dr. belisarius Oct 15 '15 at 6:14
  • 1
    $\begingroup$ Fixed in the development version today. $\endgroup$ – ilian Oct 20 '15 at 16:20
4
$\begingroup$

As I noted in a comment to the question, I made a query about this issue to WRI tech support. I have now received a reply. I quote the relevant part.

It does appear that NSolve is not behaving properly, and I have forwarded an incident report to our developers with the information you provided. I would like to include a link to the stack exchange article; do you have the stack exchange article number?

I have sent a reply giving the URL of this question as requested.

Also, on the basis of this reply from WRI, I am marking the question with .

Update

I received another email from WRI tech support concerning this issue saying the developers have agreed to fix it.

Thank you for the link to the article. I have heard back from our development team and a fix for this issue is expected in a future release.

$\endgroup$
3
$\begingroup$

This bug has been fixed in Mathematica 10.4.0.

NSolve[5 Tan[t] + 9 == 0 && 0 <= t < 2 Pi, t]

(* {{t -> 2.07789}, {t -> 5.21949}} *)
$\endgroup$

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.