Re: Integration
- To: mathgroup at smc.vnet.net
- Subject: [mg5980] Re: [mg5865] Integration
- From: Allan Hayes <hay at haystack.demon.co.uk>
- Date: Sat, 8 Feb 1997 22:37:54 -0500
- Sender: owner-wri-mathgroup at wolfram.com
Mark Dowell <mark.dowell at jrc.it> [mg5865] Integration writes > I have a question involving the definite INTEGRATE function. > With integration you give Mathematica; the function of x, and the values of > x between which you want it integrated. My problem is that I KNOW the area > I want (and know that I am using the origin as xmin) but I need Mathematica > to calculate xmax for me. Mark: You may find the following idea useful when your integral has to be solved numerically. Suppose we want to find for which X Integrate[Sqrt[Cosh[x] -1],{x,0,X}] = 4. (!) Solve the corresponding differential equation to get a "Numerical Indefinite integral" over a suitable range: NDSolve[{y'[x] == Sqrt[Cosh[x]-1], y[0]==0}, y, {x,0, 4}] {{y -> InterpolatingFunction[{0., 4.}, <>]}} yf = y/.%[[1]]; Plot[{yf[x],4},{x,0,4}] -Graphics- FindRoot[yf[x] == 4, {x, {2,2.5}}] {x -> 3.05714} Or FindRoot[yf[x] == 4, {x, 2}, Jacobian -> Sqrt[Cosh[x]-1]] {x -> 3.05714} NB. I got a value 3.071294 simply by clicking on the graph to select it then holding the Command key down and moving the pointer onto the intersection. The cordinates of the pointer are shown at the bottom of the window and if you click and copy they can be pasted. Allan Hayes hay at haystack.demon.co.uk http://www.haystack.demon.co,uk