The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Double integration
Replies: 10   Last Post: Dec 6, 2011 12:42 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Roger Stafford

Posts: 5,929
Registered: 12/7/04
Re: Double integration
Posted: Dec 2, 2011 5:29 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Marcio Barbalho" <> wrote in message <jbbd71$af$>...
> I have abso-bloody-lutely nothing against numerial integration. In actuality, I love numerical methods, of course, that does not mean I am an expert. I am just a junior engineer who loves maths and eventually find it interesting to play with calculus on rainy weekends.
> Alright... my question is... how do I solve the inner integral numerically if the upper limit is not a number but an expression? I tried with the substitutions you proposed it pushed me to the drawing board, meaning it hit some point that neither mupad nor maple could go any further.
> Thank you

- - - - - - - - - -
OK, do you agree with me that changing to polar coordinates gives you this equivalent double integral:

int (0,asec(5/3)) int (3*sec(t),5) sqrt((625-16*r^2)/(25-r^2))*r dr dt ?

I'm not certain but I don't believe Mupad or Maple can do that for you. It takes a little calculus on your part.

However, I strongly suspect that Maple can obtain a formula in terms of t for that inner integral taken with respect to r:

int (3*sec(t),5) sqrt((625-16*r^2)/(25-r^2))*r dr

If I can do it using the substitution u = sqrt(25-r^2) as I showed you earlier, presumably Maple can also do it with some trick or other. If not, here is the basic form out of my integral table that will allow you to solve that indefinite integral in terms of u I mentioned:

int sqrt(a^2+z^2) dz = 1/2*z*sqrt(a^2+z^2)+1/2*a^2*log(z+sqrt(a^2+z^2))

From that you can derive a solution to the above inner definite integral. Either way, this inner integral does not require numerical integration. The result is a specific formula in terms of t for the inner integral.

Using the resulting formula for the inner definite integral as a function of t, you can then use one of matlab's numerical quadrature functions, 'quad', 'quadgk', or 'quadl', to do a single numerical (outer) integration with respect to t using the inner integral expression as an integrand between the two limits t=0 and t=asec(5/3). You do need to do a little study on these routines to be able to set up the desired error tolerances, etc.

As I mentioned earlier there should be no trouble with singularities if you proceed along the above lines. On the other hand, if you were to integrate with respect to t first and then with respect to r afterwards, I believe you would have trouble with a singularity at r = 5, so it is advisable to integrate with respect to r first.

Does all that make sense? If not, just ask for further help.

Roger Stafford

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.