Respuestas (1)

Star Strider
Star Strider el 1 de Feb. de 2020

0 votos

Analytically, it likely does not have a solution since it is nonlinear and most nonlinear differential equations do not have analytic solutions.
You can get some solutions for it numerically, however it quicklly goes to infinity:
syms r SH y(r) y0 y10 Y
yp = diff(y,r);
yp2 = diff(y,r,2);
eqn = ( yp2 + yp/r-SH*y^2 == 0 );
[VF,Subs] = odeToVectorField(eqn);
yfcn = matlabFunction(VF, 'Vars',{r,Y,SH})
SH = 1; % Change To Appropriate Value
rspan = linspace(0.0001, 11, 75);
ic = [1 1]*0.1;
[r,y] = ode45(@(r,y)yfcn(r,y,SH), rspan, ic);
figure
plot(r, y)
grid
legend(string(Subs))
This works, however it will not work for all sets of initial consitions, or all values of ‘r’. Experiment with the initial conditions to see what works.

Etiquetas

Preguntada:

el 1 de Feb. de 2020

Respondida:

el 1 de Feb. de 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by