Showing that solutions to a differential equation are non-negative for all time We've been given the following question:  

Let $a$ and $p$ be real-valued piecewise continuous functions defined on $[t_0,t_1]$ and let $E \subset [t_0,t_1]$ be the (finite) set of points at which $a$ or $p$ fail to be continuous. Assume that $x:[t_0,t_1] \rightarrow \mathbb{R}$ is continuous and satisfies
$$ x(t) = x(t_0) + \int_{t_0}^t a(s)x(s)+p(s) ds$$
Show that if $x(t_0) \ge 0$ and $p(t) \ge 0$ for all $t \in [t_0,t_1]$, then $x(t) \ge 0$ for all $t \in [t_0,t_1]$.  

I've little idea of how to go about showing this. I've tried going about it by contradiction, assuming that $x(t)$ was negative at some point (and so in some small interval by continuity) but this got me nowhere. I'd appreciate a pointer in the right direction.
Suppose we divide $[t_0,t_1]$ into intervals $[b_1,b_2],[b_2,b_3],\dots$ in each interval I can differentiate and write the equation as $x'(t)=a(t)x(t)+p(t)$ 

We have, by the integrating factor method, $$x(t)\exp(\int_{b_i}^t-a(y)dy)=\int_{b_i}^tp(y)\exp(g(y))dy+C$$, where $g(y)=\int_{b_i}^y-a(t)dt$ .Now assume $x\geq 0$ at some $b_i$. As the term inside the integral is $\geq 0$(right hand side) and the entire right hand side is $\geq 0$ at $t=b_i$.(exponentials are positive),we have that $x$ is always $\geq 0$ in $[b_0,b_i]$(As the right hand side is an increasing function) By induction it is $\geq 0$ everywhere.
Suppose we divide $[t_0,t_1]$ into intervals $[b_1,b_2],[b_2,b_3],\dots$ in each interval I can differentiate and write the equation as $x'(t)=a(t)x(t)+p(t)$ 

We have, by the integrating factor method, $$x(t)\exp(\int_{b_i}^t-a(y)dy)=\int_{b_i}^tp(y)\exp(g(y))dy+C$$, where $g(y)=\int_{b_i}^y-a(t)dt$ .Now assume $x\geq 0$ at some $b_i$. As the term inside the integral is $\geq 0$(right hand side) and the entire right hand side is $\geq 0$ at $t=b_i$.(exponentials are positive),we have that $x$ is always $\geq 0$ in $[b_0,b_i]$(As the right hand side is an increasing function) By induction it is $\geq 0$ everywhere.