2
$\begingroup$

How to solve x^5-sinx=0 in mathematica? I try in this way: Solve[x^5 - Sin[x] == 0, x],but t doesn't work.

$\endgroup$
  • 4
    $\begingroup$ It's a transcendental equation, so Mathematica won't be able to solve it. Try FindRoot instead (note that its syntax is somewhat different.) $\endgroup$ – Michael Seifert Jun 18 '15 at 20:35
  • 2
    $\begingroup$ "Solve[ ] doesn't work with transcendental equations" - your title actually answers your question, y'know. $\endgroup$ – J. M. is away Jun 18 '15 at 21:08
  • 2
    $\begingroup$ @Guesswhoitis. I was the one who spoiled it $\endgroup$ – Dr. belisarius Jun 18 '15 at 21:29
  • 1
    $\begingroup$ To close-voters: This can be solved, in a limited way, by Solve. (Nor IMO is it really clearly exemplified or explained in the documentation.) Now, I wouldn't be surprised if there's a duplicate lurking somewhere on site....perhaps this: mathematica.stackexchange.com/q/54896? Excellent answer by Artes, too. $\endgroup$ – Michael E2 Jun 18 '15 at 23:10
4
$\begingroup$

Try

Reduce[x^5 - Sin[x] == 0, x, Reals] 

or if you want the two roots that are close to -1 and 1 you could do something like

Table[FindRoot[x^5 - Sin[x] == 0, {x, i}], {i, {-1, 1}}]
$\endgroup$
  • 1
    $\begingroup$ Hi ! Please, click on the gray question mark to the right when posting/asking question and read more about code formatting. $\endgroup$ – Sektor Jun 18 '15 at 21:07
  • $\begingroup$ One can wrap your idea up with Solve this way: Solve[x^5 - Sin[x] == 0, x, Reals, Method -> Reduce]. (+1) $\endgroup$ – Michael E2 Jun 18 '15 at 22:25
2
$\begingroup$

Some more ways: Restricting the domain helps Solve out.

Over a real interval:

Solve[{x^5 - Sin[x] == 0, -1 <= x <= 1}, x]
(*
  {{x -> 0},
   {x -> Root[{-Sin[#1] + #1^5 &, -0.96103694149677306152}]},
   {x -> Root[{-Sin[#1] + #1^5 &, 0.96103694149677306152}]}}
*)

Over a complex rectangle:

Solve[{x^5 - Sin[x] == 0, -1 <= Re@x <= 1 && -2 <= Im@x <= 2}, x]
(*
  {{x -> 0},
   {x -> Root[{-Sin[#1] + #1^5 &, -0.961036941496773061523728659911}]},
   {x -> Root[{-Sin[#1] + #1^5 &, 
     0.*10^-60 - 1.04492470949183607101955795081806975589201595243508883000864 I}]},
   {x -> Root[{-Sin[#1] + #1^5 &, 
     0.*10^-60 + 1.04492470949183607101955795081806975589201595243508883000864 I}]},
   {x -> Root[{-Sin[#1] + #1^5 &, 0.961036941496773061523728659911}]}}
*)

(See How do I work with Root objects?, if unfamiliar with Root.)

$\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.