How do I input a condition to numerically solve an ODE that does not have the variable = 0?
Show older comments
I'm attempting to solve the follwing ODE:
dfdr = (-(w.*r.^(3)-2*m)./(r.*(w.*r^(3)+4*m))).*f - (9*w^(2)*m^(2).*r)./((w^(2).*r.^(4)+4*w*m.*r).^(3/2));
I know the function f goes to infinity when r=0, so I can't use an initial condition where r=0. I instead want to use a condition where f=0 when r=r0, a value I've found. How do I input this? Every ODE solver seems to only allow a condition where r=0.
Answers (1)
darova
on 4 Mar 2020
Try
rspan = [0.01 1];
4 Comments
Jamie Read
on 4 Mar 2020
darova
on 4 Mar 2020
Put it like that. Im sure it will be correct

Jamie Read
on 7 Mar 2020
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!