Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Using FindRoot with lists of variable size' topicStudent Support Forum > General > "Using FindRoot with lists of variable size"

Help | Reply To Topic
Author Comment/Response
Matt Walter
06/26/99 05:49am

I am trying to write a progam that solves for two inputs which drive three nonlinear differential equations to some specific value at a given time. The inputs are of the form:

Sum[f[i] Sin[it/n],{i,1,n}]

where f[] is a list of n values to be solved for. I try to solve for these using the FindRoot function but I come accross the problem that I have to actually type out each and every search specification ( {a[i],1,2} ). As a result, the user can't simply specify n, but rather has to go and alter the search specs in FindRoot.

The funtion which I am solving is one which takes as an input the piecewise portion of the input (i.e. the values of f[i]) and returns the solution of the differential equations at time T. Again, I have to type out the inputs to the function in FindRoot ( F[{a[1],a[2], . . },{b[1],b[2],..}] ). Is there a way to eliminate the need to do this?

I have a feeling that I am being too vague. If so let me know and I will give whatever information you need.
I appreciate any help.

Thanks,
Matt Walter

URL: ,
Help | Reply To Topic