Initial problem: (see the very bottom for my actual question)
Problem $13$* ($5$ marks) A $4$ wheel drive car of mass $m$ accelerates from rest. The friction coefficient is $\mu$. The engine delivers a constant power to the wheels $P$. Find the relationship between the speed of the car and time. Write your answer as a function of time.
My attempt:
Firstly in this problem there are no drag forces resisting motion, the only horizontal force on the car is the total force of friction across all four tires from the road. The work done by the engine can all be assumed to go towards increasing the kinetic energy $KE$, the power $P$ is the rate of change of $KE$, as this is constant we can say at a time $t$, $KE=Pt\Rightarrow\frac12mv(t)^2=Pt\Rightarrow v(t)=\sqrt{\frac{2Pt}{m}}$. However this doesn't involve $\mu$, sketch $v(t):$
velocity-time-graph-1
Acceleration is the gradient in a velocity time graph and here the acceleration is infinite at time $t=0$ which implies infinite force. Differentiate $v(t)$ w.r.t. $t$:
$$a(t)=\frac{d}{dt}\sqrt{\frac{2Pt}{m}}=\sqrt{\frac{2P}{m}}\frac{d}{dt}\sqrt{t}=\sqrt{\frac{2P}{m}}\frac{1}{2\sqrt{t}}=\sqrt{\frac{P}{2mt}},$$
and clearly $a\rightarrow\infty$ as $t\rightarrow0$:
acceleration-time-graph-1
We can resolve this as follows. The forward accelerating force on the car is provided by the frictional force of the ground on the tires, so it's maximum is $F_{max}=\mu R$ where $R$ is the whole of normal reaction of the ground on the car, the whole because it's $4$ wheel drive so each wheel contributes some of $F_{max}$ but $F_{max}$ is the total forward force.
car-road-model
$R=mg$ due to vertical equilibrium, so $ma_{max}=\mu mg\Rightarrow a_{max}=\mu g,$ sketching this:
acceleration-time-graph-2
So for $t$ less than some $t_1, a=\mu g$, for these values of $t,\:\sqrt{\frac{P}{2mt}}$ is greater than $\mu g\:$ so here $\mu g$ takes over and becomes the actual acceleration as it is the maximum that the acceleration can be, we can interpret this as: the force which the engine can provide from the torque of the axle is greater than the frictional force which the wheels can apply to the road) meaning only $\mu mg$ (max friction) of that force is applied on the road (and therefore on the tires by the road) this also means that the wheels are experiencing "dynamic friction". This forward frictional force gets transferred to the axle via normal contact force and accelerates the car body forward, as it also does in the static friction case but the rest of the force goes to additionally spinning the wheels in excess of what they would need to be spinning to provide the current acceleration given the grip that they have and causing them to "slip extra". But after $t_1$ seconds $a=\sqrt{\frac{P}{2mt}}<\mu g$, so the previously derived acceleration function takes over purely because it's no longer being limited by the force which the ground can provide rather by the force which the engine can provide to the wheels due to the increasing nature of the work required to increase $KE$ as velocity increases. When the $\sqrt{\frac{P}{2mt}}$ function takes over this is when the tires immediately start "gripping" in that wheels aren't over-slipping what they need to do, the nature of the forward force on the tires becomes "static friction" - the fact that it's now gripping doesn't mean that you get an increase in acceleration at this point rather the opposite, the rate of increase of velocity depends on the force that the wheels are being driven into the ground with. We can find $t_1$ by equating: $\mu g=\sqrt{\frac{P}{2mt_1}}\Rightarrow t_1=\frac{P}{2m\mu^2 g^2}$. Resketch the velocity graph:
velocity-time-graph-2
Similarly for $t<t_1$ the velocity function will have maximum acceleration, we can find this velocity by integrating $\mu g$ w.r.t. $t$ giving $\mu gt$ with no added constant since it starts from rest. We can verify the value of $t_1$ here by equating: $\mu gt_1=\sqrt{\frac{2Pt_1}{m}}\Rightarrow \mu^2g^2t_1^2=\frac{2Pt_1}{m}\Rightarrow t_1=\frac{2P}{m\mu^2g^2}$.
My question is why is this value of $t_1$ $4$ times greater than it was from using the acceleration? Surely the velocity function should go from having maximum gradient to decreasing gradient at the same time as the acceleration itself decreases from its maximum value. So if I were to write $v(t)$ as a piecewise function would I write:
$$v(t)=\begin{cases}\mu gt & \text{if }\: 0<t<\frac{P}{2m\mu^2g^2}\\ \sqrt{\frac{2pt}{m}} & \text{if }\: t\geq\frac{P}{2m\mu^2g^2}\end{cases}$$
or
$$v(t)=\begin{cases}\mu gt & \text{if }\: 0<t<\frac{2P}{m\mu^2g^2}\\ \sqrt{\frac{2pt}{m}} & \text{if }\: t\geq\frac{2P}{m\mu^2g^2}\end{cases}$$
Apologies for being long winded in that friction section but I have really tried to emphasise why I believe that the acceleration should be a piecewise function, since certain limitations of the force on the tires are changing.
Here we have four forces : the gravity $\vec{F}_g = -mg\,\hat{e}_y$, the normal force $\vec{F}_n = F_n\,\hat{e}_y$, the friction $\vec{F}_f = -F_f\,\hat{e}_x$ and the motor traction $\vec{F}_m = F_m\,\hat{e}_x$. Newton's second law implies $$ m\vec{a} = \vec{F}_g + \vec{F}_n + \vec{F}_f + \vec{F}_m, $$ hence $F_n = mg$ and $F_f = \mu F_n = \mu mg$. The engine force may be deduced from its power, with $F_m = \frac{P}{v}$. The horizontal equation of motion is thus : $$ m\dot{v} = \frac{P}{v} - \mu mg $$ It is nonlinear and cannot be solved as easily as you did, without stronger hypothesis.
If you want to make energy considerations, you should start from this basic principle : the difference in mechanical energy is due the work of non-conservative forces, with the friction and the motor traction being the non-conservative forces in the present case. Mathematically, it is translated by $$ \Delta E_{mec} = E_{mec}(t_2) - E_{mec}(t_1) = W_f(t_1\rightarrow t_2) + W_m(t_1\rightarrow t_2), $$ which becomes $\dot{E}_{mec} = P_f + P_m$ in the continuous limit. The friction power is given by $P_{\vec{F}_f} = \vec{F}_f \cdot \vec{v} = -F_fv = -\mu mgv$, while the engine power $P_m = P$ is constant. On the other hand, given that the potential energy stays the same, one has $\dot{E}_{mec} = \dot{E}_{kin} = \frac{\mathrm{d}}{\mathrm{d}t}\left(\frac{1}{2}mv^2\right) = mv\dot{v}$. Again, we end up with the differential equation $$ \dot{v} = \frac{P}{mv} - \mu g, $$ which is not trivial.