loop question
- To: mathgroup at smc.vnet.net
- Subject: [mg36110] loop question
- From: dechenau at purdue.edu
- Date: Wed, 21 Aug 2002 05:52:28 -0400 (EDT)
- Organization: Purdue University
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
I've been trying to create a simple loop to solve an equation for a
variable (s) various values of a parameter (an integer i between 100 and
800), using FindRoot. This is what I have:
k1 = 900
M = 1000
d = 0.85
Do[FindRoot[(\(\((M - i)\) \((M - \(k1 \((M)\)\)\/\(k1 + i\))\) \((s
\((1 \- d)\) - d \((1 - d\^s)\))\)\)\/i + \(k1 \((M)\)\)\/\(k1 + i\))\)
\((d\^\(s + \1\))\) - \((M - i)\) == 0, {s, 0, 3500}], {i, 100, 800}]
It works if I punch in values for the parameter, without doing the loop,
. But if I use the loop, I get this:
"Secant method failed to converge to the prescribed accuracy after
\!\(15\) \
iterations."
and then it stops.
I was wondering if someone could help me with that. Thanks a lot,
Emmanuel