Need help calculating this double integral

I looked up the basic integrating syntax for double integrals on Mathematica, but I end up getting a rather odd answer when trying to calculate this double integral. I’m not sure if there’s something wrong with my syntax or not.

Capture.JPG

When I use Wolfram Alpha (non pro version), it is unable to calculate this double integral for me unless I split it up into two separate double integrals. For example, here is one of the double integrals.

And when I try to do this in Mathematica, I get…

PDE's3.JPG

n,m are positive whole integers. Is this something that needs to be declared? Any help would be appreciated!

Thanks

Hello Cameron,

you Mathematica inputs contains several errors: sin(x) → Sin[x], pi → [Pi]. Then you have to tell Mathematica about n,m being positive Integers. Find below the corresponding input and results (Mathematica 10.1):

In[208]:= Simplify[Integrate[ Sin[n \[Pi] x] Sin[ m \[Pi] y/2] (x + y), {x, 0, 1}, {y, 0, 2}], Assumptions -> {m > 0, n > 0, {m, n} \[Element] Integers}]

Out[208]= (2 (-2 (-1)^m + (-1)^(1 + n) + 3 (-1)^(m + n)))/(m n \[Pi]^2 )

Best regards,

Michael

It’s been a while since I’ve used Mathematica. Completely forgot about the format for trigonometric functions. Thank you for the response.