Problem with riccati equation
Show older comments
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
Answers (2)
Walter Roberson
on 30 Aug 2011
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
on 30 Aug 2011
0 votes
1 Comment
Walter Roberson
on 30 Aug 2011
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.
Categories
Find more on Matrix Computations 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!