# Solution of differential equation and then draw a graph

I have two differential equations: $$da/dt = a (.3 a^{-3} + .7)^{1/2}$$ and $$d \tau /dt = 1/a$$. The initial conditions are $$t = 0$$; $$a = 1$$ and $$\tau = 0$$, respectively.

How can I solve the equations in Mathematica? I need to calculate different values of $$a$$, $$t$$ and $$\tau$$ also plot $$\tau$$ vs $$a$$.

• Thanks a lot, @David :) – Photon Nov 28 '18 at 8:36

How can I solve the equations in Mathematica

One way could be to use NDSolve

ClearAll[a,t,tau];
ode1   = a'[t]   == a[t] Sqrt[ (3/10  * 1/a[t]^3 + 7/10)];
ode2   = tau'[t] == 1/a[t];
ic1    = a    == 1;
ic2    = tau  == 0;
sol    = NDSolve[{ode1,ode2,ic1,ic2},{a[t],tau[t]},{t,0,5}] And now you can plot them

 Plot[Evaluate[a[t] /. sol], {t, 0, 5}, PlotRange -> All] Plot[Evaluate[tau[t] /. sol], {t, 0, 5}, PlotRange -> All] Is it possible to plot a[t] vs /tau?

You can try to use ParametricPlot for this.

 ParametricPlot[{Evaluate[a[t]], Evaluate[tau[t]]} /. sol, {t, 0, 0.5}] • Thanks a lot for your effort. But still now I found error when trying to draw a[t] vs /tau. Can you please resolve this? – Photon Nov 28 '18 at 9:37
• Is it possible to plot a[t] vs /tau? – Photon Nov 28 '18 at 10:18
• @Photon try ParametricPlot to plot a(t) vs. tau(t) – Nasser Nov 28 '18 at 16:47