- #1
Frank Einstein
- 170
- 1
Hello everyone. I am testing mathematica to work with some line integrals. I want to go from the point (0,0) to (2, 3) over a straight line. I do it with 3 different parametrizations. The problem is that each one offers me a different result. The original problem is a two dimensional gaussian random variable.
varianza=2;
Integrate[(1.)*Exp[(-1.)*(x^2 + y^2)/(2.*varianza)]/(2*Pi*varianza), {x, 0, 2}, {y, 0, 3}].
The result is 0.203534.
The first reparametrization is x=2*t, y=3*t, t∈[0,1]
Integrate[(Sqrt[2^2 + 3^2]* Exp[(-1.)*((2*t)^2 + (3*t)^2)/(2.*varianza)]/(2*Pi*varianza)), {t,
0, 1}].
The result is 0.139526.
The second is done by using polar coordinates, r∈[0,sqrt(2²+3²)] and θ=ArcTan[3/2].
angulo = ArcTan[2, 3];
Integrate[(r*Exp[(-1.)*((Cos[angulo]*r)^2 + (Sin[angulo]*r)^2)/(2.*varianza)]/(2*Pi*varianza)), {r, 0, Sqrt[2^2 + 3^2]}]
The result is 0.152984.
Shoudn't the value of all three integrals be the same? If that is the case, what am I doing wrong?
Thanks for reading.
varianza=2;
Integrate[(1.)*Exp[(-1.)*(x^2 + y^2)/(2.*varianza)]/(2*Pi*varianza), {x, 0, 2}, {y, 0, 3}].
The result is 0.203534.
The first reparametrization is x=2*t, y=3*t, t∈[0,1]
Integrate[(Sqrt[2^2 + 3^2]* Exp[(-1.)*((2*t)^2 + (3*t)^2)/(2.*varianza)]/(2*Pi*varianza)), {t,
0, 1}].
The result is 0.139526.
The second is done by using polar coordinates, r∈[0,sqrt(2²+3²)] and θ=ArcTan[3/2].
angulo = ArcTan[2, 3];
Integrate[(r*Exp[(-1.)*((Cos[angulo]*r)^2 + (Sin[angulo]*r)^2)/(2.*varianza)]/(2*Pi*varianza)), {r, 0, Sqrt[2^2 + 3^2]}]
The result is 0.152984.
Shoudn't the value of all three integrals be the same? If that is the case, what am I doing wrong?
Thanks for reading.