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: [mg122449] Re: Problem with Solve and NSolve
  • From: "David Park" <djmpark at comcast.net>
  • Date: Sat, 29 Oct 2011 07:08:40 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <4981166.16368.1319792199648.JavaMail.root@m06>

There are an infinite number of roots so Mathematica can't give a solution.
However, if you use an inequality to specify the x domain, Mathematica will
find the solutions. The equation is even so one only needs the positive
roots but I include the first few negative roots. Copy and evaluate the
following in one cell.

rootequation = x^3 Sin[x] == 1;  
Solve[{rootequation, -5 < x < 20}, x]  
% // N  
roots = x /. %  


For those who have the Presentations application the following will plot the
roots on the curve and graduate the x axis using the root values.

<< Presentations` 

xticks = CustomTicks[Identity, databased[roots]];
Draw2D[
 {Draw[x^3*Sin[x], {x, -5, 20}],
  Aliasing@Draw[1, {x, -5, 20}],
  CirclePoint[{#, 1}, 2, Black, ColorData["Crayola"]["TealBlue"]] & /@
    roots},
 AspectRatio -> 1/4,
 PlotRange -> {-10, 20},
 Frame -> True,
 FrameTicks -> {{Automatic, Automatic}, {xticks, 
    xticks // NoTickLabels}},
 PlotLabel -> Style[phrase["Roots of ", rootequation], 16],
 ImageSize -> 600] 


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/  


From: V. Williams [mailto:gvicente at gmail.com] 

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?




  • Prev by Date: Re: List plot with random size for each point
  • Next by Date: Re: Strings with different Styles in a Grid
  • Previous by thread: Re: Problem with Solve and NSolve
  • Next by thread: Strings with different Styles in a Grid