# How to solve differential equation of this type?

So, I tried so solve the first equation, where I am looking for $p_2$, in Mathematica with next command:

x:=DSolve[Derivative[p2,z]==-p1*p1der/p0-8*p1/p0-8*p0der/p0^2-
p0der*p2/p0,p2,z]


but i got The function p2 appears with no arguments. I also before that defined:

p0:=(1+64*(1-z))^0.5
p1:=8*(1/p0-1)
p0der:=z derivative(p0) !this is not code, just command
p1der:=z derivative(p1) !this is not code, just command


What should i do to solve first $p_2$, after that $p_3$ symbolic in Mathematica, i am beginner I have no idea what could be mistake and how big is it?

• READ THIS FIRST!!!!! I COULD NOT POST IT BECAUSE OF EQUATIONS!!! I am solving next two symbolic differential equations: $$p_2'=\dfrac{-p_1p_1'+8\cdot(-p_1'-\dfrac{p_0'}{p_0})-p_0'p_2}{p_0}$$ $$p_3'=\dfrac{-p_1'p_2-p_1 p_2'-8 p_2'-8\dfrac{p_1'}{p_0}+8\dfrac{p_1 p_0'}{p_0^2}-p_0'p_3}{p_0}$$ where every variable is dependent on $z$: $$p_0=(1+64(1-z))^{0.5}$$ $$p_1=8\cdot(\dfrac{1}{p_0}-1)$$ $$p_2=f(z)$$ $$p_3=f(z)$$ – nick_name Jul 12 '18 at 13:20
• check the formating -> should be [] instead of () in some cases – Gregory Rut Jul 12 '18 at 13:20
• It is the same. – nick_name Jul 12 '18 at 13:21
• Whay do you have z_ in parenthesis in equation for p0 and p1, and after that there is only z? – nick_name Jul 12 '18 at 13:42
• Sorry, typo fixed. p0[z_] := Sqrt[1 + 64 (1 - z)]; p1[z_] := 8 (1/p0[z] - 1); DSolve[{p2'[z] == (-p1[z] p1'[z] + 8 (-p1'[z] - p0'[z]/p0[z]) - p0'[z] p2[z])/p0[z], p3'[ z] == (-p1'[z] p2[z] - p1[z] p2'[z] - 8 p2'[z] - 8 p1'[z]/p0[z] + 8 p1[z] p0'[z]/p0[z]^2 - p0'[z] p3[z])/p0[z]}, {p2, p3}, z] – Bill Jul 12 '18 at 13:52

p0[z_] := Sqrt[1 + 64 (1 - z)];
p1[z_] := 8 (1/p0[z] - 1);

eqns = {p2'[z] == (-p1[z] p1'[z] + 8 (-p1'[z] - p0'[z]/p0[z]) - p0'[z] p2[z])/p0[z],
p3'[z] == (-p1'[z] p2[z] - p1[z] p2'[z] - 8 p2'[z] - 8 p1'[z]/p0[z] +
8 p1[z] p0'[z]/p0[z]^2 - p0'[z] p3[z])/p0[z]} // Simplify;

sol = DSolve[eqns, {p2, p3}, z][]

(* {p2 -> Function[{z},
C/Sqrt[65 - 64 z] - (4 (8 + (65 - 64 z) Log[65 - 64 z]))/(65 - 64 z)^(3/2)],
p3 -> Function[{z}, -((512 C)/((4160 - 4096 z) Sqrt[65 - 64 z])) +
C/Sqrt[65 - 64 z] - (1/((65 - 64 z)^(5/2)))
32 (2 (61 - 65 Sqrt[65 - 64 z] + 64 (-1 + Sqrt[65 - 64 z]) z) + (-65 + 64 z)
Log[65 - 64 z])]} *)


Verifying that the solutions satisfy the equations,

eqns /. sol // Simplify

(* {True, True} *)


The functions are real when

FunctionDomain[#, z] & /@ ({p2[z], p3[z]} /. sol)

(* {z < 65/64, z < 65/64} *)


The asymptotic values as z -> -Infinity are

Limit[#[z] /. sol, z -> -Infinity] & /@ {p2, p3}

(* {0, 0} *)


Setting the arbitrary constants (C and C) to zero and plotting

Plot[
Evaluate[{p2[z], p3[z]} /. sol /. {C -> 0, C -> 0}],
{z, -5, 65/64},
PlotLegends -> Placed[{p2, p3}, {0.25, 0.75}]] 