Electric Field problem (need help with integral)

1. Jul 11, 2013

izelkay

1. The problem statement, all variables and given/known data
This is from an example problem in my textbook.
Here's a link to a picture of the integral I'm having trouble with:
http://puu.sh/3ApyU.png [Broken]

It shows the answer but I'm really not sure how they got there, or where to begin really. How do I integrate in terms of y with those x's in there? Any help would be appreciated.

Edit:
Guess it'd help if y'all could see the problem. I searched for it online and this is basically it:
http://puu.sh/3Aq4f.png [Broken]

Only difference is this one's from 0 to a while mine is -a to a. Also, my question just reads "Find the electric field at point P on the x-axis at a distance x from the origin." I understand everything up to solving the integral for the x-component

Last edited by a moderator: May 6, 2017
2. Jul 11, 2013

SteamKing

Staff Emeritus
Treat 'x' as a constant. You are integrating with respect to 'y'. You should be able to find the integral using what you learned in calculus. If you have forgotten what you learned in calculus, then find a table of integrals and put the integral into a suitable form.

3. Jul 11, 2013

izelkay

Ok, I'm trying to use trig-sub but I'm not sure I'm doing it right:

I drew a triangle with y on the opposite end, x on the adjacent end, and √(x^2+y^2) as the hypotenuse.

With this, I have cosθ = x/√(x^2+y^2)

To make it match what's in the integrand, I put:

cos^3θ/x^2 = x^3/(x^2+y^2)

Now for the dy, I have tanθ = y/x, so y = xtanθ and dy = xsec^2θdθ

So now my integral looks like:

∫cosθ/x dθ | [-a,a]

(1/x)∫cosθdθ | [-a,a]

=(1/x)sinθ | [-a,a]

Subbing back in for sinθ:

= y/x√(x^2+y^2) | [-a, a]

= a/x√(x^2+a^2) - (-a/x√(x^2+a^2))

= 2a/x√(x^2+a^2)

Is this correct so far? Or did I mess up somewhere?

4. Jul 11, 2013

vanhees71

The integral is of the form
$$\int \mathrm{d} x f'(x) F[f(x)].$$
The standard substitution for such cases is
$$u=f(x), \quad \mathrm{d} u=\mathrm{d} x f'(x).$$
$$\int \mathrm{d} u F(u).$$

5. Jul 11, 2013

ehild

It looks correct.

ehild