# MatLab code for these Integrals.

1. Jan 31, 2014

### John Mark

How can I write proper language for these integrals in MatLab ?

Best,

John Mark

#### Attached Files:

• ###### Integrals.pdf
File size:
107.1 KB
Views:
67
2. Jan 31, 2014

### Simon Bridge

Those integrals are:$\renewcommand{\dy}{\text{d}y} \renewcommand{\dx}{\text{d}x}$

1) $$\iint e^{-(x^4+y^4)}\;\dx\dy$$ 2) $$\iint e^{-(x^4+y^4)}(x^2+y^2)x^2y^2e^{-2x^2y^2}\;\dx\dy$$

What have you tried?
How would you normally handle integrals in matlab?
i.e. what's the trouble you are having here?

(Otherwise it just looks like a couple of homework problems.)

3. Feb 1, 2014

### John Mark

I need to write the code of solutions by MonteCarlo method in MatLab for my scientific research. These are the integrals which I'm struggling with.

4. Feb 1, 2014

### Simon Bridge

Have you had a look how matlab normally gets used to simulate monte-carlo?
http://www.mathworks.com/discovery/monte-carlo-simulation.html
http://www.columbia.edu/~mh2078/MCS04/MCS_overview.pdf
http://physics.gac.edu/~huber/envision/instruct/montecar.htm

How would you normally handle integrals in matlab?

Basically, I still don't know where your problem lies.
i.e. in a Monte Carlo sim, would want to evaluate a radius ... which is $r^2=x^2+y^2$ ?
Have you realized that $(x^2+y^2)^2=x^4+y^4+2x^2y^2$ ?