I have to solve $$\left\{\begin{matrix} x\ddot{x}+\frac{3}{2}\dot{x}^2=\frac{1}{\rho}\left (P_v-a_1t^2-a_2t-P_0 \right )\\ x(0)=5\cdot10^{-6}\\ \dot{x}(0)=0 \end{matrix}\right.$$ I do not know if it may be helpful, but note that $a_1=2.488125\cdot 10^{14}$ is very big while the timespan is very small ($t_f=70\cdot 10^{-6}$). I get the result without MATLAB returning any error or warning, but this result does not convince me (I expected the peak to be around $t=4\cdot 10^{-5}$). I have already tried switching to ode15s, but the output is the same. What else can I do to see if the output changes or not and then be sure that this result is correct?
function vdot = no_thermal_effect_98(t,v)
rho = 959.78;
P0 = 101325;
Pvap = 94285.313;
a1 = (P0 - 1800) / (20e-6)^2; %nondimensional
a2 = 2 * (1800 - P0) / (20e-6); %nondimensional
%
vdot = zeros(2,1);
vdot(1) = v(2);
vdot(2) = -1.5 * v(2) * v(2) / v(1) + 1 / (v(1) * rho) *...
(Pvap - P0 - a1 * t^2 - a2 * t);
run
x0 = 5e-6; %meters
tf = 70e-6; %seconds
[t,v] = ode45(@no_thermal_effect_98,[0,tf],[x0,0]);
[t,v(:,1)];
plot(t,v(:,1))
Edit
Let us first consider the case where the pressure outside the bubble is constant: $x\ddot{x}+\frac{3}{2}\dot{x}^2=\frac{1}{\rho}\left (P_v-P_0\right )$.
If $P_0>P_v$ the bubble collapses (i.e. the radius decreases in a monotonic fashion); conversely, if $P_0<P_v$ the bubble grows.
Now let us consider a pressure variation outside the bubble described by the equation $P(t)=a_1t^2+a_2t+P_0$.
At $40 \mu s$ the pressure outside the bubble is greater than the pressure inside the bubble (here in the picture, indicated by the orange line and equal to $Pv=94285.313 Pa$). That is why I expected the peak, that is, the moment where the bubble started collpasing, would be $40 \mu s$.