Sketch a graph of $\mathrm{pH}$ vs. volume when $\pu{50.0 cm^3}$ of $\pu{1 M}$ $\ce{HCl}$ is titrated with $\pu{1 M}$ $x\,\pu{cm^3}$ $(x \in (0,50))$ of $\ce{NH3}.$
As $\ce{HCl}$ fully dissociates, I know that
$$ \mathrm{pH} = \mathrm{p}[\ce{HCl}]. \tag{1} $$
When $x\,\pu{cm^3}$ of $\ce{NH3}$ is added, $x\,\pu{cm^3}$ of $\ce{HCl}$ reacts. So, I can write the concentration of $\ce{HCl}$ as the function of $x$ this way:
$$ \mathrm{pH} = -\log\frac{c_0(\ce{HCl})\cdot V(\ce{HCl})}{ V_\mathrm{tot}} = -\log\frac{0.1(50-x)}{50+x}. \tag{2} $$
Is this function correct? I am doing high school chemistry, hence my knowledge in chemistry is quite limited.