# How to calculate a double integral over a triangle by transforming to polair coordinates & by using a transformation

Let T be the triangel with vetrices $( 0,0 ) , ( 1,0 )\mbox{ and } ( 0,1 )$. Evaluate the integral :

$$\iint_D e^{\frac{y-x}{y+x}}$$

a) by transforming to polar coordinates

b) by using the transformation $u = y - x$ and $v = y + x$

In a) i planned to describe the domain $0 \leq r \leq 1$ , $0 \leq \theta \leq \frac{\pi}{2}$ , and then i would use some trigonometric identities to express $\frac{y-x}{y+x}$ , i thought something like : $$y=r\cdot\sin(\theta) \\ x=r\cdot\cos(\theta)$$ would apply. Then my plan would be to go something like this : $$\int_0^\frac{\pi}{2}e^{\left(\cfrac{\sin(\theta)-\cos(\theta)}{\sin(\theta)+\cos(\theta)}\right)}d\theta\int_0^1e^{\left(\cfrac{-r}{r}\right)}\cdot r\,dr$$

I can evaluate the outer intergral to $\frac{1}{2}\cdot e^{-1}$ But in terms of the inner intergral I do not now which trigonometric rewrite to use is it even correct this far ?? The answer is supposed to be : $$\frac{1}{4}\cdot(e-e^{-1})$$

In terms of b) my plan was to use the change of variables formula : $$\iint_Df(x,y)dx dy= \iint_Sg(u,v)\Bigg\vert{\frac{d(x,y)}{d(u,v)}\Bigg\vert} du dv$$ I would then use the transformation $u = y - x$ and $v = y + x$, then find the partial differentials : $$e^{\frac{y-x}{y+x}} dx$$ $$e^{\frac{y-x}{y+x}}dy$$ $$e^{\frac{u}{v}}du$$ $$e^{\frac{u}{v}}dv$$

And then i would set up a matrix like this : $${\frac{d(u,v)}{d(x,y)}}=\cfrac{1}{{\cfrac{d(x,y)}{d(u,v)}}}$$

But the differentions result in some huge expressions and the matrix i am able to set leads to a result looking like this : $$\frac{ \frac{1}{2}\cdot(y+x)^{4} } {\bigg(e^{\frac{2y-2x}{y+x}}\cdot x\cdot y+x^2+u\cdot y \bigg)}$$ My original plan was to then take the double integral of the result of the matrice in terms of du & dv but i am not able to figure out how to do this with so many unknowns. And upon applying the transformation i am not shure about how the correct parametrization will look like my best gues is :

Original triangle $( 0,0 ) , ( 1,0 )$ and $( 0,1 )$ Upon transformation $( 0,0 ) , ( -1,1 ))$ and $( 0,1 )$

Hope that someone will try to give me a hint i would really like to be able to find the rigth solution : $$\frac{1}{4}\cdot(e-e^{-1})$$

-

In polar coordinates, $r$ is bounded by the line $x+y=1$. The integral is then
\begin{align}\int_0^{\pi/2} d\theta \: \exp{\left(\frac{\sin{\theta}-\cos{\theta}}{\sin{\theta}+\cos{\theta}}\right)} \int_0^{1/(\cos{\theta}+\sin{\theta})} dr \: r &= \frac{1}{2}\int_0^{\pi/2} d\theta \: \exp{\left(\frac{\sin{\theta}-\cos{\theta}}{\sin{\theta}+\cos{\theta}}\right)}\frac{1}{(\cos{\theta}+\sin{\theta})^2}\\&=\frac{1}{4} \int_0^{\pi/2} d\theta \: \frac{\exp{\left(-\frac{\cos{(\theta+\pi/4)}}{\cos{(\theta-\pi/4)}}\right)}}{\cos^2{(\theta-\pi/4)}}\\&=\frac{1}{4} \int_{-\pi/4}^{\pi/4} d\phi\: \exp{\left(\frac{\sin{\phi}}{\cos{\phi}}\right)} \sec^2{\phi}\\&=\frac{1}{4} \int_{-\pi/4}^{\pi/4} d(\tan{\phi}) e^{\tan{\phi}}\\&=\frac{1}{4} \left (e^{\tan{(\pi/4)}} - e^{\tan{(-\pi/4)}}\right) \:\end{align}
$$\iint_D dx \,dy\: f\left(\frac{y-x}{y+x}\right) = \frac{1}{4} \int_{-1}^1 du \: f(u)$$