Multiple Integral Challenge Question, no solution in guide

Click For Summary
SUMMARY

The integral evaluation of \int_0^1 \int_0^1 e^{max(x^2,y^2)}dydx was analyzed, revealing that the symmetry about the line y = x allows for simplification. The correct approach involves integrating over the triangular region defined by y = x and multiplying the result by 2. The analytic solution converges to e - 1. A MATLAB approximation initially failed due to a missing exponential in the code, which was later corrected, aligning the numeric and analytic results.

PREREQUISITES
  • Understanding of double integrals and their properties
  • Familiarity with the concept of symmetry in integration
  • Proficiency in MATLAB for numerical approximations
  • Knowledge of exponential functions and their integration
NEXT STEPS
  • Explore advanced techniques for evaluating double integrals
  • Learn about MATLAB's numerical integration functions such as integral2
  • Study the properties of the max function in multivariable calculus
  • Investigate error analysis in numerical approximations
USEFUL FOR

Students and educators in calculus, mathematicians working on integral evaluations, and MATLAB users seeking to improve their numerical approximation skills.

kostoglotov
Messages
231
Reaction score
6
I have what I think is a valid solution, but I'm not sure, and when I try to check the answer approximately in Matlab, I don't get a verified value, and I'm not sure if my analytic solution or my approximation method in Matlab is at fault.

1. Homework Statement

Evaluate the integral

\int_0^1 \int_0^1 e^{max(x^2,y^2)}dydx

where max(x^2,y^2) is the larger of the numbers x2 and y2.

Assumption: I'm assuming that x2 and y2 are real valued.

Homework Equations



The Attempt at a Solution



I consider the region of integration thusly

There is symmetry about the line y = x. Below this line, the max value is of y squared, since for y < x, y2 > x2. And so above the line y = x, the max value is x squared.

This is true because 0 <= x <= 1 and 0 <= y <= 1.

Using Matlab to sketch the 3-D graph gets

YOH5gf8.jpg


This looks right, and we can see the symmetry.

Now, if we setup the region is that we just integrate over the triangle created by y=x dividing the square [0,1]x[0,1], knowing that we must multiply the result by 2 at the end, we could evaluate the integral

\int_0^1 \int_0^x e^{y^2} dy dx

Now, this is problematic, since we can't eval. this analytically.

We can change the order of integration, but this results in further evariable squared integrated with respect to said variable situations. For instance, in one arrangement we get

\int_0^1\int_x^1 e^{x^2} dy dx

inner integral

\int_x^1 e^{x^2} dy = \left[ye^{x^2}\right]_x^1

outer integral

\int_0^1 e^{x^2} - xe^{x^2} dx

Which is still problematic, and happens with all changes to the order of integration

But e^{x^2} = e^{y^2} so we can just replace e^{y^2} with e^{x^2} in the original problematic integral.

So

2 \times \int_0^1 \int_0^x e^{x^2} dy dx = 2 \times \frac{1}{2}\left(e-1\right) = e - 1

Or

2 \times \int_0^1 \int_0^y e^{y^2} dx dy = 2 \times \frac{1}{2}\left(e-1\right) = e - 1

Anyhow, I wanted to get an approx. verification of this is Matlab.

The code I used to generate that graph is

[x,y] = meshgrid(0:0.01:1,0:0.01:1); % 0.01 increments
z = max(x^2,y^2);
surf(x,y,z)

so, I figure for a good approximation of the volume under that surface should be

sum(sum(z.*0.0001)); % element-wise multiplication of z by 0.01 x 0.01

But this gives 0.513433500000000 which is not e - 1.

Is my analytic solution incorrect or my numeric approximation method? Or both?
 
Physics news on Phys.org
kostoglotov said:
[x,y] = meshgrid(0:0.01:1,0:0.01:1); % 0.01 increments
z = max(x^2,y^2);
surf(x,y,z)

I'm not familiar with Matlab, but didn't you forgot the exponential in the definition of z ?
 
  • Like
Likes   Reactions: kostoglotov
There is no exponential. The purpose of the graph was just to see where x^2 was larger and where y^2 was larger.

Though that was not really necessary. Since both integrals are from 0 to 1, both x and y are always positive and so x^2= y^2 means x= y. max(x^2, y^2)= x if and only if x> y and max(x^2, y^2)= y if and only if x< y. So the integral, \int_0^1\int_0^1 e^{ax(x^2, y^2)} dxdy can be written \int_0^1 \int_0^x e^{x^2} dydx+ \int_0^1 \int_x^1 e^{y^2} dydx.

However, x= y only on the boundary not everywhere in the region of integration so e^{x^2} is NOT always equal to e^{y^2}. Perhaps you simply meant to appeal to symmetry to say that the two integrals are the same?
 
Last edited by a moderator:
  • Like
Likes   Reactions: kostoglotov
Dansuer said:
I'm not familiar with Matlab, but didn't you forgot the exponential in the definition of z ?

I absolutely did..Ok...this is the second time this week that my reading comprehension has brought me to PF...maybe I can build some sort of mechanical hand to slap me in the face if I don't proof read...thanks
 
Dansuer said:
I'm not familiar with Matlab, but didn't you forgot the exponential in the definition of z ?

Update, making that correction to the code makes the numeric and analytic answers line up. Thanks for your help :)
 

Similar threads

Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
12
Views
2K
  • · Replies 27 ·
Replies
27
Views
3K
  • · Replies 34 ·
2
Replies
34
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K