2

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.

Dr. belisarius
  • 115,881
  • 13
  • 203
  • 453
  • 4
    It's a transcendental equation, so Mathematica won't be able to solve it. Try FindRoot instead (note that its syntax is somewhat different.) – Michael Seifert Jun 18 '15 at 20:35
  • 2
    "Solve[ ] doesn't work with transcendental equations" - your title actually answers your question, y'know. – J. M.'s missing motivation Jun 18 '15 at 21:08
  • 2
    @J.M. I was the one who spoiled it – Dr. belisarius Jun 18 '15 at 21:29
  • 1
    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: http://mathematica.stackexchange.com/q/54896? Excellent answer by Artes, too. – Michael E2 Jun 18 '15 at 23:10

2 Answers2

4

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}}]
Sektor
  • 3,320
  • 7
  • 27
  • 36
demm
  • 1,533
  • 9
  • 13
  • 1
    Hi ! Please, click on the gray question mark to the right when posting/asking question and read more about code formatting. – Sektor Jun 18 '15 at 21:07
  • One can wrap your idea up with Solve this way: Solve[x^5 - Sin[x] == 0, x, Reals, Method -> Reduce]. (+1) – Michael E2 Jun 18 '15 at 22:25
2

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.)

Michael E2
  • 235,386
  • 17
  • 334
  • 747