MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: using findroot for multiple functions


In a message dated 2001/8/11 4:03:39 AM, amsommer at pacific.mps.ohio-state.edu 
writes:

>I need to solve multiple equations varying one parameter.  I am able to
>do
>this if I vary the parameter in equal steps, but I have a list of numbers
>that I need to plug in.  Here is an example because my description
>probably is not very clear:
>
>Here is an example of what works:
>
>Table[t /.FindRoot[(t-a)*Sin[t+a] + Sin[t-a]*Cos[t+a], {t,0}],[a,1,10,.5]
>
>My problem comes in because I want have a list of values that are not in
>equal steps.  I have tried the following with no success:
>
>list = {1, 3.4, 99.1,100,109}
>ReplaceAll[[FindRoot[(t-a)*Sin[t+a] + Sin[t-a]*Cos[t+a],{t,0}],a-> list]
>
>If anyone has an idea on how I can get this to work, please let me know.
>

list = {1, 3.4, 99.1,100,109};

FindRoot[(t-#)*Sin[t+#] + Sin[t-#]*Cos[t+#], {t,0}]& /@ list

{{t -> 0.9999999957859541}, 
  {t -> -0.14754829012037235}, 
  {t -> 7.717139365543081}, 
  {t -> 0.5397879298427968}, 
  {t -> 0.9469935794800659}}


Bob Hanlon
Chantilly, VA  USA


  • Prev by Date: Re: Hiding parts of a graph
  • Next by Date: Re: using findroot for multiple functions
  • Previous by thread: using findroot for multiple functions
  • Next by thread: Re: using findroot for multiple functions