Calculating Multiple Integrals on Mathematica (Electric fields)

This can significantly increase the computational time. It might be helpful to break down the problem into smaller steps and try to optimize the code for faster calculation. Additionally, double check your formulas and make sure they are correct. You can also try using different methods of integration to see if that speeds up the process. Overall, make sure to carefully analyze and optimize your code to improve the computational time.
  • #1
GriffinHeart
3
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
  • #2
That's probably because Ey[0, 0, 0] involves calculating a couple of integrals, while Eymedio[0] involves calculating integrals of integrals.
 

What is Mathematica and how does it calculate multiple integrals?

Mathematica is a powerful computational software program that can perform various mathematical operations, including calculating multiple integrals. It uses advanced algorithms and numerical methods to accurately evaluate integrals and provide numerical solutions.

What is the significance of calculating multiple integrals in the context of electric fields?

Electric fields are often described using mathematical equations that involve multiple integrals. By calculating these integrals, scientists and engineers can gain a better understanding of the behavior and properties of electric fields, which is crucial for various applications in technology and physics.

Can Mathematica handle complex integrals involving multiple variables?

Yes, Mathematica is capable of handling complex integrals that involve multiple variables. It has built-in functions and tools specifically designed for this purpose, making it a powerful tool for solving difficult integrals.

What are some tips for efficiently calculating multiple integrals on Mathematica?

To efficiently calculate multiple integrals on Mathematica, it is important to simplify the integrand as much as possible before inputting it into the software. This can involve using trigonometric identities, algebraic manipulations, and other techniques to reduce the complexity of the integral. It is also helpful to use appropriate options and settings in Mathematica to improve the accuracy and speed of the calculation.

Are there any limitations or potential errors when using Mathematica to calculate multiple integrals?

While Mathematica is a powerful tool for calculating multiple integrals, it is not infallible. The software may encounter difficulties in solving certain types of integrals, and the results may not always be completely accurate. It is important to carefully check and verify the solutions obtained from Mathematica, especially for complex or highly sensitive calculations.

Similar threads

Replies
1
Views
802
  • Advanced Physics Homework Help
Replies
2
Views
825
  • Advanced Physics Homework Help
Replies
13
Views
2K
  • Advanced Physics Homework Help
Replies
17
Views
2K
  • Advanced Physics Homework Help
Replies
1
Views
738
  • Advanced Physics Homework Help
Replies
19
Views
817
  • Advanced Physics Homework Help
2
Replies
44
Views
3K
  • Advanced Physics Homework Help
Replies
7
Views
1K
  • Advanced Physics Homework Help
Replies
15
Views
2K
  • Advanced Physics Homework Help
Replies
1
Views
410
Back
Top