# Finding the Electric Field of a non-uniform Semi-Infinite Slab of Charge

## Homework Statement

Non uniform slab of charge density $$\rhov = \rho_{0}cos(pi*x/(2d))$$
extends infinitely in the y and z planes is present between -d < x < d.
Find the Electric Field everywhere.

## Homework Equations

$$\int\epsilon_{0}{E^\rightarrow}\bullet{ds^\rightarrow}= \int\rho_{v}dv$$

## The Attempt at a Solution

So I have an understanding of how Gauss' Integral Law is supposed to function but this semi-infinite slab is confusing me.

First I will attempt to solve the rhs of Gauss' integral law
$$\int\rho_{v}dv = \int_{0}^{L}\int_{0}^{W}\int_{-d}^{d}\rho_{0}cos(\pi x/(2d))dxdydz = \int_{0}^{L}\int_{0}^{W}\frac{2d\rho_{0}sin(\pi x/(2d))}{\pi} |^{d}_{-d}dydz = \frac{4d\rho_{0}WL}{\pi}$$

Now I believe I did that correct the lhs has me much more confused.

Since it is infinite about the y and z axis wouldn't it observe some of the same principles as a infinite sheet charge?

I dont believe we can define ds as the surface area is infinite. So that forces the use of the integral. Which is where I believe I am going wrong. There is only charge at the +x and -x axis outside of d and -d. How do I set up the Lhs?
$$\int_{0}^{L}\int_{0}^{W}\epsilon_{0}E a_{x}dydz = \epsilon_{0}EWL$$
This cannot be correct because when applying Gauss' Differential Law there is no way to get the surface charge density without a x variable in which to differentiate.

Thats where I am stuck how is the LHS of Gauss' Integral Law to be implemented such that when applying Gauss' Differential Law I receive the surface charge density $$\rho_{0}cos(pi*x/(2d))$$

Thanks for the help