Re: NIntegrate where terms of integrand have unknown constant coefficients
- To: mathgroup at smc.vnet.net
- Subject: [mg8934] Re: NIntegrate where terms of integrand have unknown constant coefficients
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Sat, 4 Oct 1997 22:08:11 -0400
- Organization: University of Western Australia
- Sender: owner-wri-mathgroup at wolfram.com
Scott Morrison wrote: > I'm trying to do something along the lines of NIntegrate[c[1] f[1][x] + > c[2] f[2][x] + ..., {x, 0, a}], where c[n_] is unknown, but the f[n_] are > defined so that NIntegrate[f[n][x], {x, 0, a}] would work. I'd like to be > able to do the numerical integration, and keep the coefficients, so I'd get > as an answer c[1] NIntegrate[f[1][x], {x, 0, a}] + c[2] NIntegrate[f[2][x], > {x, 0, a}] + ... with all the NIntegrate's evaluated. I'm not sure I understand your question? It seems to me that you already have the answer: just enter your expression in the form c[1] NIntegrate[f[1][x], {x, 0, a}] + c[2] NIntegrate[f[2][x], {x, 0, a}] + ... and all the NIntegrate's will evaluate. Cheers, Paul ____________________________________________________________________ Paul Abbott Phone: +61-8-9380-2734 Department of Physics Fax: +61-8-9380-1014 The University of Western Australia Nedlands WA 6907 mailto:paul at physics.uwa.edu.au AUSTRALIA http://www.pd.uwa.edu.au/~paul God IS a weakly left-handed dice player ____________________________________________________________________