Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problem with Solve and NSolve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122471] Re: Problem with Solve and NSolve
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Sat, 29 Oct 2011 07:12:39 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201110280935.FAA20759@smc.vnet.net> <0549918A-7899-4197-8857-B51316CA3940@mimuw.edu.pl>

On 28 Oct 2011, at 12:53, Andrzej Kozlowski wrote:

>
> On 28 Oct 2011, at 11:35, V. Williams wrote:
>
>> I've recently tried Mathematica 8.0.1, and I've found that it's 
unable to compute Solve[x^3*Sin[x]==1,x] (and the same with NSolve), 
which gives an error:
>> Solve::nsmet: This system cannot be solved with the methods available 
to Solve
>>
>> WolframAlpha solves it without problems, so what's wrong with Mathematica?
>>
>
> WolframAlpha gives you only a few roots in an interval chosen by itself (and assumes that you only want the real ones). You can get as many roots as you like with:
>
> N[Solve[x^3*Sin[x] == 1 && Abs[x] < 100, x, Reals]]
>
> =
{{x->-97.3894},{x->-94.2478},{x->-91.1062},{x->-87.9646},{x->-84.823},{x->=
-81.6814},{x->-78.5398},{x->-75.3982},{x->-72.2566},{x->-69.115},{x->-65.9=
734},{x->-62.8319},{x->-59.6903},{x->-56.5487},{x->-53.4071},{x->-50.2655}=
,{x->-47.1239},{x->-43.9823},{x->-40.8407},{x->-37.6991},{x->-34.5575},{x-=
>-31.416},{x->-28.2743},{x->-25.1328},{x->-21.9911},{x->-18.8497},{x->-15.=
7077},{x->-12.5669},{x->-9.42358},{x->-6.28721},{x->-3.10829},{x->-1.04879=
},{x->1.04879},{x->3.10829},{x->6.28721},{x->9.42358},{x->12.5669},{x->15.=
7077},{x->18.8497},{x->21.9911},{x->25.1328},{x->28.2743},{x->31.416},{x->=
34.5575},{x->37.6991},{x->40.8407},{x->43.9823},{x->47.1239},{x->50.2655},=
{x->53.4071},{x->56.5487},{x->59.6903},{x->62.8319},{x->65.9734},{x->69.11=
5},{x->72.2566},{x->75.3982},{x->78.5398},{x->81.6814},{x->84.823},{x->87.=
9646},{x->91.1062},{x->94.2478},{x->97.3894}}
>
> or if you want complex roots:
>
> N[Solve[x^3*Sin[x] == 1 && Abs[x] < 100, x, Reals]]
>
> =
{{x->-97.3894},{x->-94.2478},{x->-91.1062},{x->-87.9646},{x->-84.823},{x->=
-81.6814},{x->-78.5398},{x->-75.3982},{x->-72.2566},{x->-69.115},{x->-65.9=
734},{x->-62.8319},{x->-59.6903},{x->-56.5487},{x->-53.4071},{x->-50.2655}=
,{x->-47.1239},{x->-43.9823},{x->-40.8407},{x->-37.6991},{x->-34.5575},{x-=
>-31.416},{x->-28.2743},{x->-25.1328},{x->-21.9911},{x->-18.8497},{x->-15.=
7077},{x->-12.5669},{x->-9.42358},{x->-6.28721},{x->-3.10829},{x->-1.04879=
},{x->1.04879},{x->3.10829},{x->6.28721},{x->9.42358},{x->12.5669},{x->15.=
7077},{x->18.8497},{x->21.9911},{x->25.1328},{x->28.2743},{x->31.416},{x->=
34.5575},{x->37.6991},{x->40.8407},{x->43.9823},{x->47.1239},{x->50.2655},=
{x->53.4071},{x->56.5487},{x->59.6903},{x->62.8319},{x->65.9734},{x->69.11=
5},{x->72.2566},{x->75.3982},{x->78.5398},{x->81.6814},{x->84.823},{x->87.=
9646},{x->91.1062},{x->94.2478},{x->97.3894}}
>
> Andrzej Kozlowski
>
>

Of course the last part was a copy and paste mistake. What I should have posted is:


N[Solve[x^3*Sin[x] == 1 && Abs[x] < 100, x]]

{{x -> -97.38937117869034}, {x -> -94.24778080219502},
  {x -> -91.10618563172359}, {x -> -87.96459576969846},
  {x -> -84.82300000837662}, {x -> -81.68141082831029},
  {x -> -78.53981427564646}, {x -> -75.39822601916512},
  {x -> -72.25662838182653}, {x -> -69.11504140785695},
  {x -> -65.9734422428741}, {x -> -62.83185710323689},
  {x -> -59.69025571612967}, {x -> -56.548673294713154},
  {x -> -53.40706854649436}, {x -> -50.26549033134277},
  {x -> -47.12388024783088}, {x -> -43.982308903722334},
  {x -> -40.840689816845185}, {x -> -37.699130507132224},
  {x -> -34.55749495838158}, {x -> -31.415958787333043},
  {x -> -28.27428964131248}, {x -> -25.13280421952295},
  {x -> -21.9910545461251}, {x -> -18.849705230650624},
  {x -> -15.707705242955596}, {x -> -12.566874483993098},
  {x -> -9.423583004746407}, {x -> -6.2872090246108705},
  {x -> -3.108287079460403}, {x -> -1.048793483723902},
  {x -> 0. + 0.9631707107308479*I},
  {x -> 0. - 0.9631707107308479*I}, {x -> 1.048793483723902},
  {x -> 3.108287079460403}, {x -> 6.2872090246108705},
  {x -> 9.423583004746407}, {x -> 12.566874483993098},
  {x -> 15.707705242955596}, {x -> 18.849705230650624},
  {x -> 21.9910545461251}, {x -> 25.13280421952295},
  {x -> 28.27428964131248}, {x -> 31.415958787333043},
  {x -> 34.55749495838158}, {x -> 37.699130507132224},
  {x -> 40.840689816845185}, {x -> 43.982308903722334},
  {x -> 47.12388024783088}, {x -> 50.26549033134277},
  {x -> 53.40706854649436}, {x -> 56.548673294713154},
  {x -> 59.69025571612967}, {x -> 62.83185710323689},
  {x -> 65.9734422428741}, {x -> 69.11504140785695},
  {x -> 72.25662838182653}, {x -> 75.39822601916512},
  {x -> 78.53981427564646}, {x -> 81.68141082831029},
  {x -> 84.82300000837662}, {x -> 87.96459576969846},
  {x -> 91.10618563172359}, {x -> 94.24778080219502},
  {x -> 97.38937117869034}}





  • Prev by Date: Re: Problem with Solve and NSolve
  • Next by Date: Re: Re: bug ?
  • Previous by thread: Re: Problem with Solve and NSolve
  • Next by thread: Re: Problem with Solve and NSolve