Re: solving nonlinear equation with mathematica !!
- To: mathgroup at smc.vnet.net
- Subject: [mg47155] Re: solving nonlinear equation with mathematica !!
- From: bobhanlon at aol.com (Bob Hanlon)
- Date: Sun, 28 Mar 2004 00:07:45 -0500 (EST)
- References: <c438oj$ekr$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Check your graph; you must have a wrong equation. Needs["Graphics`ImplicitPlot`"]; Needs["Graphics`Colors`"]; eqns={x^2-y-1==0, 10*x*Exp[-x]-y==0}; FindRoot[eqns, {x,#[[1]]}, {y,#[[2]]}]& /@ {{-0.1, -1}, {2, 2.5}} {{x -> -0.09058966837961079, y -> -0.9917935119828722}, {x -> 1.9446329780681595, y -> 2.7815974193902346}} pts = {x, y} /. %; ImplicitPlot[eqns,{x,-0.2,2.2}, AspectRatio->1/GoldenRatio, Frame->True, Axes->False, PlotStyle -> {Blue, Green}, Epilog-> {AbsolutePointSize[4], Red, Point /@ pts}]; Plot[{x^2-1, 10*x*Exp[-x]}, {x,-0.2,2.2}, Frame->True, Axes->False, PlotStyle -> {Blue, Green}, Epilog-> {AbsolutePointSize[4], Red, Point /@ pts}]; Bob Hanlon In article <c438oj$ekr$1 at smc.vnet.net>, m004202002 at yahoo.com (why) wrote: << I face root finding problem solving nonlinear equation I have system nonlinear equation x^2-y-1 = 0; 10x exp(-x)-y = 0 ; If you draw the graph you see two intersecting point . I have found a point [Using FindRoot function ] In (-0.1,-0.5) the point is (-0.0905897,-0.991794 )---it is OK But In (2.0,1.0) the point is (1.94463,2.7816) But the graph says the x->2.something ,y->1.somthing I have used same FindRoot function to find the root in (2.0,1.0 ).