11 views (last 30 days)

kindly help me to solve this equation a = 0.5, b=2, r(0)=1.2

Roger Stafford
on 20 Feb 2018

Here is how I would approach your problem. First we write

a*r*dr/dt*log(a*r*dr/dt) = a*b/r^6

Now define w:

w = log(a*r*dr/dt)

and therefore

a*r*dr/dt = exp(w)

Thus

exp(w)*w = a*b/r^6

Hence

w = lambertw(a*b/r^6)

a*r*dr/dt = exp(lambertw(a*b/r^6))

dr/dt = 1/(a*r)*exp(lambertw(a*b/r^6))

Now finally you have a differential equation in the form that Matlab's ode functions can evaluate numerically, provided you have the lambertw function available.

Torsten
on 21 Feb 2018

Alternatively, by setting

y1 = r

y2 = dr/dt,

you can use ODE15S to solve the differential-algebraic system

y1' = y2

y2*log(a*y1*y2)-b/y1^7 = 0

Best wishes

Torsten.

Opportunities for recent engineering grads.

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

Start Hunting!
## 2 Comments

## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/383783-dr-dt-ln-a-r-dr-dt-b-r-7-how-to-solve-this-equation#comment_537548

⋮## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/383783-dr-dt-ln-a-r-dr-dt-b-r-7-how-to-solve-this-equation#comment_537548

## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/383783-dr-dt-ln-a-r-dr-dt-b-r-7-how-to-solve-this-equation#comment_537550

⋮## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/383783-dr-dt-ln-a-r-dr-dt-b-r-7-how-to-solve-this-equation#comment_537550

Sign in to comment.