I am trying to solve a differential equation numerically. The code is
H1[z_] = (3 (0.3) (1 + z)^(4) +
Exp[a1 u[z]]) (3 - (1/2) (1 + z)^2 (u'[z])^2 )^(-1)
s1 = ParametricNDSolve[{(H1[z])^2 (1 + z)^2 u''[z] -
3 (H1[z])^2 (1 + z) u'[z] + a1 Exp[(a1 u[z])] == 0, u'[0] == 1,
u[0] == 1}, u, {z, 0, 5}, {a}]
It doesn't plot and evaluate u[z]
. I want to plot u[z]
for different values of the parameter a1
.
a1
. OrBlock[{a1 = 8, a = 2}, Plot[u[a][z] /. s1, {z, 0, 5}]]
$\endgroup$