# Calculating the Electric Field generated by a rod with charge

## Homework Statement

A rod of length 2L has a charge -Q uniformly distributed over its left half and +Q uniformly distributed over its right half. Find E at point p a distance z above the center of the rod.

## Homework Equations

E= 1/(4pi$\epsilon$$_{0}$)∫dq/r($\hat{r}$)
dq=λdl

where $\epsilon$$_{0}$= 8.854 x 10-12 C2/Nm2
and λ=charge per unit length

## The Attempt at a Solution

I'm not even sure where to start exactly. I know the length from the rod to p at any given point will be √(L2+z2) but I'm really not sure where to go from here. I missed a couple of class periods due to being sick and I've been trying to play catch up ever since so any help would be greatly appreciated!