Using NIntegrate[] within FindRoot[] ??
- To: mathgroup at smc.vnet.net
- Subject: [mg2306] Using NIntegrate[] within FindRoot[] ??
- From: a_kowald at chemie.fu-berlin.de (Axel Kowald)
- Date: Mon, 23 Oct 1995 12:43:19 -0400
- Organization: Kristallographic Institute FU Berlin
Hello everybody I like to use NIntegrate with FindRoot as in the following trivial example: FindRoot[NIntegrate[r x,{x,0,3}] == 9, {r,1}] That means I want to find the value of "r" for which the integral is equal to 9. However, I get the error message: Integrand 1.5 r is not numerical ... What am I doing wrong and how am I doing it right ??? Many thanks in advance Axel Kowald P.S. I know that the example is more than trivial, I just used it for illustrative purposes. I also know that I can write a function which iterates several values for r, but if I could use FindRoot its definitely the most elegant way.