How to solve Double integral with variable bounds in Matlab?

10 views (last 30 days)
Hi. for solving an equation by using MATLAB, in the first step, we need to solve some dual integral. boundary of integrals are defined by functions, and the integrand is symbolic. when we use 'int' or 'dblquad' functions, MATLAB didn't give us an suitable and acceptable answer. several parts of answer of integrals due to not being explicit,may remove by each other. what is the solution for this problem? (For example, one of the integrals is shown in the following pic.)
  1 Comment
Walter Roberson
Walter Roberson on 17 Dec 2017
Because you have not constrained the range of the variables, MATLAB must assume that they could be imaginary and must assume that g-r*sin(theta) could be 0 (leading to division by 0) or that cos(phi) could be 0 (leading to division by 0). a/cos(phi) could be greater than R, involving a backwards integration, and phi could be greater than pi, involving a backwards integration. It is tricky to handle the infinities correctly, to automatically calculate the limits properly.

Sign in to comment.

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!