home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.math.symbolic
- Path: sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!nntp.uio.no!news
- From: rivero <rivero@cc.unizar.es>
- Subject: Re: Plotting implicite functions in Mathematica
- Message-ID: <1992Nov20.100743.11974@ulrik.uio.no>
- X-Xxdate: Fri, 20 Nov 92 11:04:57 GMT
- Sender: news@ulrik.uio.no (Mr News)
- Nntp-Posting-Host: 155.210.147.31
- Organization: fisica teorica UZ
- X-Useragent: Nuntius v1.1.1d12
- References: <1992Nov19.174001.1294@leland.Stanford.EDU>
- Date: Fri, 20 Nov 1992 10:07:43 GMT
- Lines: 33
-
- In article <1992Nov19.174001.1294@leland.Stanford.EDU> mo Saarenheimo,
- sarrenhe@leland.Stanford.EDU writes:
- >I have an implicite function F(X,A)=0, 0<A<1, which can not be solved
- >explicitly for X. I wish to plot X as a function of A. Here's the best
- >I've been able to work out.
- >
- >Plot[X/.FindRoot[F[X,A]==0,{X,Xinit}],{A,0,1}]
- >
- >The obvious problem with this approach is that, for every value of A, the
- >iteration for X begins from the same initial value Xinit. This is, of
- >course, inefficient, and often there exists no initial value Xinit for
- >which the iteration converges for every value of A.
-
- If convergence is the only problem, and you have a good, fast machine,
- you could use ContourPlot[F[X,A],..., Contours->{0}
-
- If you can not afford this increase in computational time, you could
- alter your FindRoot call to use secant method, by giving two points to start,
- and tryiing (perhaps qith a previous search for extremals) that there
- exists a solution between both.
-
- >Since F(X,A) is continuous, the obvious alternative is to use the solution
- >reached by FindRoot for previous value of A as the initial value for the
- >next iteration.
- >
- >Can somebody suggest an elegant and efficient way to do this?
-
- Is not efficient, but in a pure C-style you can Plot[oldv=FindRoot[...
-
-
- -Alejandro Rivero
- Theoretical Physics
- Zaragoza Univ, Spain
-