Re: Help needed
- To: mathgroup at smc.vnet.net
- Subject: [mg71119] Re: Help needed
- From: "dimitris" <dimmechan at yahoo.com>
- Date: Thu, 9 Nov 2006 03:37:15 -0500 (EST)
- References: <eisdmg$l9i$1@smc.vnet.net>
You could use Trace first to see where is your mistake Trace[FindMinimum[erfunc[c1], {c1, 0}] ] The following works as you desired. func[(c1_)?NumericQ] := Module[{ldadn}, logdadnroot = ldadn /. FindRoot[ldadn == c1*(1/(1 + Sqrt[ldadn]))^2, {ldadn, 1}]]; erfunc[(c1_)?NumericQ] := (func[c1] - 1)^2 FindMinimum[erfunc[c1], {c1, 0.001}] {2.4697446749461332*^-17, {c1 -> 3.9999999701820843}} Regards Dimitris