Re: refer to the result of FindRoot[ ]

*To*: mathgroup at smc.vnet.net*Subject*: [mg61551] Re: refer to the result of FindRoot[ ]*From*: Dave Seaman <dseaman at no.such.host>*Date*: Sat, 22 Oct 2005 00:35:48 -0400 (EDT)*Organization*: Information Technology at Purdue*References*: <dja24u$fg7$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

On Fri, 21 Oct 2005 06:34:06 +0000 (UTC), perimeterbow at gmail.com wrote: > FindRoot[] returns result in this format {x->2.123}, how can I get rid > of the x-> so I can use the number directly to automate calculation > flow? > Thanks. Use the operator "/." to perform the substitution. For example, let's say you want to evaluate 1-x^2/2+x^4/24, given that x is a root of the equation "x==Cos[x]": In[1]:= sol=FindRoot[x==Cos[x],{x,1}] Out[1]= {x -> 0.739085} In[2]:= 1-x^2/2+x^4/24 /. sol Out[2]= 0.739309 -- Dave Seaman Judge Yohn's mistakes revealed in Mumia Abu-Jamal ruling. <http://www.commoncouragepress.com/index.cfm?action=book&bookid=228>