Help with solution of a horrible equation

1 次查看(过去 30 天)
A mechanical engineering problem ends up requiring the solution of the following horrible equation for y as a function of t:
(dy/dt)*(A * cos(t-B*cos(y)) * B * sin(y) - C * cos(y)) + (A * cos(t-B*cos(y)) - cot(y)) = 0
A, B and C are constants (A=1.9, B=0.3, C=1.5). The range of solution is 0.5*pi-->2.5*pi. The initial condition is y(pi/2)=pi/2.
I tried to set this up with ode45 (it ran forever) and ode15i and failed miserably. For ode15i, I tried: [t, y] = ode15i(@odefun, [0.5*pi 2.5*pi], pi/2, 0)
function res = odefun(t, y, yprime) res = yprime *(A * cos(t-B*cos(y)) * B * sin(y) - C * cos(y)) + (A * cos(t-B*cos(y)) - cot(y)); end
Any suggestion on how to set up this equation for solution would be appreciated.

回答(1 个)

rantunes
rantunes 2015-3-3
Hey,
Can you please show your implementation?
Thanks

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by