Problem with riccati equation

Hi every body, I have a big problem with an riccati equation, and I want to solve it in MATLAB, can anyone help me? Thank you;
dq(t)/dt= A*q^2(t)+ B*q(t)+C;
Wher A,B and C are known

回答(2 个)

Do you have the symbolic toolbox?
If your q^2(t) is intended to mean q(t)^2 then the solution is
q(t) = 1/2*(-B+tan(1/2*(4*C*A-B^2)^(1/2)*(t+C1))*(4*C*A-B^2)^(1/2))/A
where C1 is the arbitrary constant of integration whose value could be pinned down if you had a boundary condition.
If, however, q^2(t) is intended to indicate d^2q/dt the second order differential of q with respect to t, then the solution would be different,
q(t) = exp(1/2/A*(1+(1-4*B*A)^(1/2))*t)*C2 + exp(-1/2*(-1+(1-4*B*A)^(1/2))/A*t)*C1-C/B
where C1 and C2 are constants of integration.
Imène ALLAB
Imène ALLAB 2011-8-30

0 个投票

thank you very much Walter!! but how did you do that?? I can't do it with ode45 ? i forget to montion that I have a finale condition q(T) :( , is that the same withe this condition?
(and yes it means q(t)^2))
Thanks again :) have a good day.

1 个评论

What is the boundary condition?
If your boundary condition is q(T) = Q for some constant T and some constant Q, then the constant of integration C1 that I noted would equal to
-(T*(4*C*A-B^2)^(1/2) - 2*arctan((B+2*Q*A)/(4*C*A-B^2)^(1/2))) / (4*C*A-B^2)^(1/2)
I solved this using Maple's dsolve()
dsolve(diff(q(t),t)= A*q(t)^2 + B*q(t)+C)
If you had the symbolic toolbox, you could do very much the same thing using MuPad's dsolve() command.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Matrix Computations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by