Calculating Multiple Integrals on Mathematica (Electric fields)

GriffinHeart
Messages
3
Reaction score
0
I'm trying to calculate several stuff about the electric field generated by 2 "plaques"

My main problem being that in mathematica it calculates fast for a point of the electric field generated in the Y component, but if i try to make the median of all the points in the plaque it takes way to much time.

And after that i'll have to plot for all the points.


PHP:
ax := 0.09
az := 0.03
d := 0.052
V := 3000
E0 := 8.85 * 10^(-12)
Ke := 8.9 * 10^9


Ey1[x_, y_, 0] := 
 Ke * E0 * (V/d) * 
  Integrate[((y + d/2) / (((x - x0)^2 + (y + d/2)^2 + z0^2)^(3/2))), 
{x0, -ax/2, ax/2}, {z0, -az/2, az/2}]

Ey2[x_, y_, 0] := 
 Ke * E0 * (V/d) * 
  Integrate[-((y - d/2) / (((x - x0)^2 + (y - d/2)^2 + z0^2)^(3/2))), 
{x0, -ax/2, ax/2}, {z0, -az/2, az/2}]

Ey[x_, y_, 0] := Ey1[x, y, 0] + Ey2[x, y, 0]

Eymedio[y_] := (1/ax) * Integrate[Ey[x, y, 0], {x, -ax/2, ax/2}]

Ey1[0, 0, 0]
Ey2[0, 0, 0]
Ey[0, 0, 0]
Eymedio[0]

And the output, without Eymedio[0]

PHP:
8133.58

8133.58

16267.2

so calculating Ey[0,0,0] is fast, but when i try to calculate the "median" it takes like huge time.

Anything obvious I'm doing wrong with mathematica? i think the formulas are all correct.

Thanks for help
 
Physics news on Phys.org
That's probably because Ey[0, 0, 0] involves calculating a couple of integrals, while Eymedio[0] involves calculating integrals of integrals.
 
Thread 'Need help understanding this figure on energy levels'
This figure is from "Introduction to Quantum Mechanics" by Griffiths (3rd edition). It is available to download. It is from page 142. I am hoping the usual people on this site will give me a hand understanding what is going on in the figure. After the equation (4.50) it says "It is customary to introduce the principal quantum number, ##n##, which simply orders the allowed energies, starting with 1 for the ground state. (see the figure)" I still don't understand the figure :( Here is...
Thread 'Understanding how to "tack on" the time wiggle factor'
The last problem I posted on QM made it into advanced homework help, that is why I am putting it here. I am sorry for any hassle imposed on the moderators by myself. Part (a) is quite easy. We get $$\sigma_1 = 2\lambda, \mathbf{v}_1 = \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix} \sigma_2 = \lambda, \mathbf{v}_2 = \begin{pmatrix} 1/\sqrt{2} \\ 1/\sqrt{2} \\ 0 \end{pmatrix} \sigma_3 = -\lambda, \mathbf{v}_3 = \begin{pmatrix} 1/\sqrt{2} \\ -1/\sqrt{2} \\ 0 \end{pmatrix} $$ There are two ways...
Back
Top