I have this differential equation, for a function $ h(x) $ subject to a initial condition $ h(0) = n $, and a relation $ h^2(x) = p(x) $
$$ (1 + x)^4 \frac{\mathrm{d} }{\mathrm{d} x} \left(\frac{h(x)^2}{(1 + x)^3}\right) = 2 h(x) $$
I solve it with Mathematica
DSolve[{(1 + x)^4 D[h[x]^2/(1 + x)^3, x] == 2 h[x], h[0] == n}, h, {x,0, 1150}]
And I get this solution
h -> Function[{x}, 1/3 (-2 + 2 (1 + x)^(3/2) + 3 n (1 + x)^(3/2))
If I use the relation for $ h(x) $, I get this differential equation
$$ (1 + x)^4 \frac{\mathrm{d}}{\mathrm{d} x} \left(\frac{p(x)}{(1 + x)^3}\right) = 2 \sqrt{p(x)} $$
Solving with Mathematica, with the initial condition $ p(0) = n^2 $
DSolve[{(1 + x)^4 D[p[x]/(1 + x)^3, x] == 2 p[x]^(1/2), p[0] == n^{2}}, p, {x, 0, 1150}]
I get a different solution (Mathematica gives four solutions)
p -> Function[{x}, 1/9 (8 + 12 n + 9 n^2 + 12 x + 36 n x + 27 n^2 x + 12 x^2 + 36 n x^2 + 27 n^2 x^2 + 4 x^3 + 12 n x^3 + 9 n^2 x^3 - 8 Sqrt[1 + x] - 12 n Sqrt[1 + x] - 8 x Sqrt[1 + x] -12 n x Sqrt[1 + x])
Why we get two different solutions?
h[x]^2 - p[x] /. {hsol, psol}
yields0
. $\endgroup$DSolve
, why do you gives{x,0, 1150}
instead of justx
? $\endgroup$Solve
[sic] returns four branches. Only one of them has only real coefficients. $\endgroup$