# Homework Help: Find the x component of the Electric Field

1. Dec 6, 2017

### themagiciant95

1. The problem statement, all variables and given/known data
Find the general formula for the x component of the electric
field if the charge density p varies only with x throughout all
space.

2. Relevant equations

3. The attempt at a solution

I started using the poisson equation $$\bigtriangledown \bullet \bar{E} = \frac{p}{\varepsilon_{0}}$$
From the problem text, I know that p has only the x component and so also E has only the x component.
With these information, i tried to calculate the poisson equation, obtaining :

$$\frac{\partial E_{x}}{\partial x} =\frac{p(x)}{\varepsilon_{0}}$$

But, i dont know how to continue the calculations... Can you help me ?

2. Dec 6, 2017

### phyzguy

Since the variation is only in x, the left hand side is $\frac{dE_x}{dx}$, not $\frac{\partial E_x}{\partial x}$. Now multiply through by dx and integrate both sides.

3. Dec 6, 2017

### themagiciant95

Do i have to integrate it as an definite or indefinite integral ? In the latter case, how can i manage the constant of integration ? Thanks

4. Dec 6, 2017

### phyzguy

Well, since you aren't told the boundary conditions, you will have to make some assumptions. You could assume for example that Ex at -∞ is zero. Or you could include the value of Ex at some point in your calculation.

5. Dec 6, 2017

### themagiciant95

For example, if i include the value of Ex in a point (it's sufficient ?), how can i use this value to calculate the constant of integration ? Thanks again

6. Dec 6, 2017

### phyzguy

Why don't you show us the calculation with the constant of integration included? Then if it isn't clear how to deal with it we can make suggestions.

7. Dec 7, 2017

### themagiciant95

$$\int dE_{x} =\frac{1}{\varepsilon _{0}}\int p(x)dx$$

$$E_{x}(x)=\frac{1}{\varepsilon _{0}}P(x) + c$$

As boundary i chose:

$$x=0 \rightarrow E_{x}=0$$
so
$$c=-\frac{1}{\epsilon _{0}}P(0)$$

is this correct ? Thanks

8. Dec 8, 2017

up

9. Dec 8, 2017

### phyzguy

It looks OK to me. Without knowing more about the boundary conditions, I think something like this is the best you can do. You could try asking your teacher for more clarification.

10. Dec 8, 2017

### themagiciant95

Thanks so much for your help :)