# Non- linear ODE

I was working on this equation but I can't get out something for this:

Clear["Global*"]
g[t_] := ((1 - b) y[t]^2/t^n + 1/t^(2 + n))^n;
eqns = y'[t] + 3/2 (a - b) y[t]/t + (3/2 a - 1)/y[t] t^3 == g[t];
DSolve[eqns, y, t]


a,b are positive but n could be negative or positive. Also plotting this equation will be usefull.

• Also y[t0]==y0 just in case. Jan 18, 2022 at 15:25
• I doubt there is analytical solution to this. Try NDSolve Jan 18, 2022 at 15:36
• MMA does not give a solution. Are you sure that a close form solution exists? Jan 18, 2022 at 15:47
• Even you can consider a==4/3 and b==7/10 Jan 18, 2022 at 15:52
• why is it important to get analytical solution? You can get numerical solution. If you want to see the effect on the solution due to different values, this also can be done numerically by changing the parameter values using Manipulate and see how the solution changes. You are not going to get a general analytical solution to this. Even the powerful DSolve can't solve unsolvable ode's. Jan 18, 2022 at 16:01

Do not have time to make a full Manipulate, but you can start with

Clear["Global*"]
g[t_]:=((1-b) y[t]^2/t^n+1/t^(2+n))^n;
ode=y'[t]+3/2 (a-b) y[t]/t+(3/2 a-1)/y[t] t^3==g[t];
pfun=ParametricNDSolveValue[{ode/.{a->3/4,b->5},y[1]==1},y,{t,1,2},{n}]

Plot[Evaluate[Table[pfun[n][t],{n,Range[5]}]],{t,1,2},
PlotRange->{Automatic,{-10,10}},AxesLabel->{"time","y(t)"},BaseStyle->14]


The above gives solution for n=1,2,3,4,5 and for specific a and b.

To make a,b change also, you can add Manipulate with sliders for all of these. Notice that different n values give solutions that blows up.

Update Here is a Manipulate with sliders. For some n values, NDSolve will have trouble making solution. That is why Quiet is added below. So you can skip that n value and go to the next. You can change the default ranges for the slider as you know better what you want for these.

Clear["Global*"]
Manipulate[
Module[{g, pde, pfun, y, t, n},
g = ((1 - b) y[t]^2/t^n + 1/t^(2 + n))^n;
ode = y'[t] + 3/2 (a - b) y[t]/t + (3/2 a - 1)/y[t] t^3 == g;
pfun = Quiet@
ParametricNDSolveValue[{ode, y[t0] == y0},
y, {t, t0, maxTime}, {n}];
Grid[{{pfun},
{Quiet@Plot[Evaluate[pfun[n0][t]], {t, t0, maxTime},
PlotRange -> {Automatic, {-maxY, maxY}},
AxesLabel -> {"time", "y(t)"}, BaseStyle -> 14,
ImageSize -> 400,
GridLines -> Automatic, GridLinesStyle -> LightGray,
PlotStyle -> Red]}
}, Spacings -> {2, 2}]
]
,
{{a, 3/4, "a"}, 0, 1, 1/4, Appearance -> "Labeled"},
{{b, 5, "b"}, 1, 10, 1/4, Appearance -> "Labeled"},
{{n0, 3, "n"}, 1, 10, 1, Appearance -> "Labeled"},
{{t0, 1, "t0"}, 0, 10, 1, Appearance -> "Labeled"},
{{maxTime, 2, "max time"}, 0, 10, 1, Appearance -> "Labeled"},
{{maxY, 10, "max Y range"}, 1, 1000, 1, Appearance -> "Labeled"},
{{y0, 1, "y(0)"}, 0, 10, 1, Appearance -> "Labeled"},
TrackedSymbols :> {a, b, n0, t0, y0, maxTime, maxY}
]
`
• thank you vert much. Jan 18, 2022 at 18:30
• @FelipeDura if the answer by Nasser solves the problem you described, perhaps you should consider accepting it by clicking the checkmark on the left
– user49048
Jan 18, 2022 at 23:05