Note: I'll be using the following notation:
- $q_1, q_2$ are the distributed loads (where you use $w$, which I reserve for deflections)
- $L = c + 2(a+b)$, the total length of the span
- $\ell = a + b$
I'll also be making use of the structure and loading's symmetry, and adopting the following model:

First let's get the reactions. Since the structure and the loading is symmetrical, this is trivial, with each support getting half of each load.
$$R = -\dfrac{q_1(L-2a)}{2} - \dfrac{q_2L}{2} - P$$
Let's then use singularity functions to describe the loading on the beam and integrate our way up to the deflection:
$$\begin{align}
\newcommand{\a}[1]{\langle #1 \rangle}
q &= R\a{x}^{-1} + q_1\a{x-a}^0 + q_2\a{x}^0 + P\a{x-\ell}^{-1} \\
Q &= R\a{x}^0 + q_1\a{x-a}^1 + q_2\a{x}^1 + P\a{x-\ell}^0 \\
M &= R\a{x}^1 + \dfrac{q_1\a{x-a}^2}{2} + \dfrac{q_2\a{x}^2}{2} + P\a{x-\ell}^1 \\
EI\theta &= \dfrac{R\a{x}^2}{2} + \dfrac{q_1\a{x-a}^3}{6} + \dfrac{q_2\a{x}^3}{6} + \dfrac{P\a{x-\ell}^2}{2} + C_1 \\
EIw &= \dfrac{R\a{x}^3}{6} + \dfrac{q_1\a{x-a}^4}{24} + \dfrac{q_2\a{x}^4}{24} + \dfrac{P\a{x-\ell}^3}{6} + C_1x + C_2 \\
\end{align}$$
Now let's use the boundary conditions to find those constants.
$$\begin{align}
\theta\left(\dfrac{L}{2}\right) = EI\theta ={}& \dfrac{R}{2}\left(\dfrac{L}{2}\right)^2 + \dfrac{q_1}{6}\left(\dfrac{L}{2}-a\right)^3 + \dfrac{q_2}{6}\left(\dfrac{L}{2}\right)^3 + \dfrac{P}{2}\left(\dfrac{L}{2}-\ell\right)^2 + C_1 = 0 \\
\therefore C_1 ={}& q_1\left(\dfrac{(L-2a)}{4}\left(\dfrac{L}{2}\right)^2 - \dfrac{1}{6}\left(\dfrac{L}{2}-a\right)^3\right) \\
&+ q_2\left(\dfrac{L}{4}\left(\dfrac{L}{2}\right)^2 - \dfrac{1}{6}\left(\dfrac{L}{2}\right)^3\right) \\
&+ P\left(\dfrac{1}{2}\left(\dfrac{L}{2}\right)^2 - \dfrac{1}{2}\left(\dfrac{L}{2}-\ell\right)^2\right) \\
={}& q_1\left(\dfrac{a^3}{6} - \dfrac{a^2L}{4} + \dfrac{L^3}{24}\right) \\
&+ \dfrac{q_2L^3}{24} \\
&+ \dfrac{P\ell(L-\ell)}{2} \\
w(0) = C_2 ={}& 0
\end{align}$$
We therefore have the full description of the entire beam. Personally, I prefer splitting the functions up for each beam segment. Therefore, we have:
For $x\in[0,a]$:
$$\begin{align}
Q ={}& R\a{x}^0 + q_2\a{x}^1 \\
={}& \dfrac{q_1(2a - L)}{2} \\
&+ q_2\left(x - \dfrac{L}{2}\right) \\
&- P \\
M ={}& R\a{x}^1 + \dfrac{q_2\a{x}^2}{2} \\
={}&\dfrac{q_1(2a - L)}{2}x \\
&+ q_2\left(\dfrac{1}{2}x^2 - \dfrac{L}{2}x\right) \\
&- Px \\
EI\theta ={}& \dfrac{R\a{x}^2}{2} + \dfrac{q_2\a{x}^3}{6} + C_1 \\
={}&q_1\left(\dfrac{2a - L}{4}x^2 + \dfrac{a^3}{6} - \dfrac{a^2L}{4} + \dfrac{L^3}{24}\right) \\
&+ q_2\left(\dfrac{1}{6}x^3 - \dfrac{L}{4}x^2 + \dfrac{L^3}{24}\right) \\
&+ P\left(-\dfrac{1}{2}x^2 + \dfrac{\ell(L-\ell)}{2}\right) \\
EIw ={}& \dfrac{R\a{x}^3}{6} + \dfrac{q_2\a{x}^4}{24} + C_1x \\
={}&q_1\left(\dfrac{2a - L}{12}x^3 + \left(\dfrac{a^3}{6} - \dfrac{a^2L}{4} + \dfrac{L^3}{24}\right)x\right) \\
&+ q_2\left(\dfrac{1}{24}x^4 - \dfrac{L}{12}x^3 + \dfrac{L^3}{24}x\right) \\
&+ P\left(-\dfrac{1}{6}x^3 + \dfrac{\ell}{2}(L-\ell)x\right)
\end{align}$$
For $x\in(a,\ell]$:
$$\begin{align}
Q ={}& R\a{x}^0 + q_1\a{x-a}^1 + q_2\a{x}^1 \\
={}&q_1\left(x - \dfrac{L}{2}\right) \\
&+ q_2\left(x - \dfrac{L}{2}\right) \\
&- P \\
M ={}&R\a{x}^1 + \dfrac{q_1\a{x-a}^2}{2} + \dfrac{q_2\a{x}^2}{2} \\
={}&q_1\left(\dfrac{1}{2}x^2 - \dfrac{L}{2}x + \dfrac{a^2}{2}\right) \\
&+ q_2\left(\dfrac{1}{2}x^2 - \dfrac{L}{2}x\right) \\
&- Px \\
EI\theta ={}&\dfrac{R\a{x}^2}{2} + \dfrac{q_1\a{x-a}^3}{6} + \dfrac{q_2\a{x}^3}{6} + C_1 \\
={}&q_1\left(\dfrac{1}{6}x^3 - \dfrac{L}{4}x^2 + \dfrac{a^2}{2}x - \dfrac{a^2L}{4} + \dfrac{L^3}{24}\right) \\
&+ q_2\left(\dfrac{1}{6}x^3 - \dfrac{L}{4}x^2 + \dfrac{L^3}{24}\right) \\
&+ P\left(-\dfrac{1}{2}x^2 + \dfrac{\ell(L-\ell)}{2}\right) \\
EIw ={}&\dfrac{R\a{x}^3}{6} + \dfrac{q_1\a{x-a}^4}{24} + \dfrac{q_2\a{x}^4}{24} + C_1x \\
={}&q_1\left(\dfrac{1}{24}x^4 - \dfrac{L}{12}x^3 + \dfrac{a^2}{4}x^2 + \left(\dfrac{L^3}{24} - \dfrac{a^2L}{4}\right)x + \dfrac{a^4}{24}\right) \\
&+ q_2\left(\dfrac{1}{24}x^4 - \dfrac{L}{12}x^3 + \dfrac{L^3}{24}x\right) \\
&+ P\left(-\dfrac{1}{6}x^3 + \dfrac{\ell}{2}(L-\ell)x\right)
\end{align}$$
And finally, for $x\in(\ell,\frac{L}{2}]$:
$$\begin{align}
Q ={}& R\a{x}^0 + q_1\a{x-a}^1 + q_2\a{x}^1 + P\a{x-\ell}^0 \\
={}&q_1\left(x - \dfrac{L}{2}\right) \\
&+ q_2\left(x - \dfrac{L}{2}\right) \\
&+ 0 \\
M ={}&R\a{x}^1 + \dfrac{q_1\a{x-a}^2}{2} + \dfrac{q_2\a{x}^2}{2} + P\a{x-\ell}^1 \\
={}&q_1\left(\dfrac{1}{2}x^2 - \dfrac{L}{2}x + \dfrac{a^2}{2}\right) \\
&+ q_2\left(\dfrac{1}{2}x^2 - \dfrac{L}{2}x\right) \\
&-P\ell \\
EI\theta ={}&\dfrac{R\a{x}^2}{2} + \dfrac{q_1\a{x-a}^3}{6} + \dfrac{q_2\a{x}^3}{6} + \dfrac{P\a{x-\ell}^2}{2} + C_1 \\
={}&q_1\left(\dfrac{1}{6}x^3 - \dfrac{L}{4}x^2 + \dfrac{a^2}{2}x - \dfrac{a^2L}{4} + \dfrac{L^3}{24}\right) \\
&+ q_2\left(\dfrac{1}{6}x^3 - \dfrac{L}{4}x^2 + \dfrac{q_2L^3}{24}\right) \\
&+ P\left(-\ell x + \dfrac{L\ell}{2}\right) \\
EIw ={}&\dfrac{R\a{x}^3}{6} + \dfrac{q_1\a{x-a}^4}{24} + \dfrac{q_2\a{x}^4}{24} + \dfrac{P\a{x-\ell}^3}{6} + C_1x \\
={}&q_1\left(\dfrac{1}{24}x^4 - \dfrac{L}{12}x^3 + \dfrac{a^2}{4}x^2 + \left(\dfrac{L^3}{24} - \dfrac{a^2L}{4}\right)x + \dfrac{a^4}{24}\right) \\
&+ q_2\left(\dfrac{1}{24}x^4 - \dfrac{L}{12}x^3 + \dfrac{L^3}{24}x\right) \\
&+ P\left(-\dfrac{\ell}{2}x^2 + \dfrac{L\ell}{2}x - \dfrac{\ell^3}{6}\right)
\end{align}$$