MATLAB: Problem with dsolve: Unable to find explicit solution

differential equationsdsolveMATLAB

Hi everyone,
I am trying to solve the following ODE:
consider that [3] = a, [4] = b and [5] = c
I am using the following code to solve this:
answer = dsolve('Da=-k1*a + km1*b - k3*a*b','Db=k1*a - km1*b - k3*a*b','Dc=k3*a*b','a(0)=0.26','b(0)=0','c(0)=0')
However when I run this code I get the following:
Warning: Unable to find explicit solution.
> In dsolve (line 201)
In Paper2_Figure4 (line 13)
answer =
[ empty sym ]
I don't understand what I'm doing wrong, any help would be greatly appreciated! Thanks 🙂

Best Answer

I found a way to do this, but I will need to wait until I get to my desktop to write through all of the steps as simplify() gave some unexpected results that are not understandable as-is.
The approach is to notice that the last sub-expression of the first two equations is the same as the expression for Dc. The first two are like Da=P+Dc , Db=-P+Dc in form. Select down to those two with the sub-expression replaced by Dc and dsolve. You will get solutions for a and c.
Take the expression for c and substitute t=0 to get c(0). You will get an expression in C1, C2, and some other terms and you know that c(0)=0 so solve() the expression for C2. The result will involve b(0) but we know that b(0)=0 so subs() that to get C2.
Now subs that C2 into the solution for a. subs t=0, solve() that equal 0.26 for C1, subs b(0)=0 and you get out C1
Now go back to the solutions for a and c and substitute in C1 and C2 and b(0)=0 to get the final a and c. Do not simplify() c!!! -- you will get weird results if you do!
Those in hand, go back to the second equation giving the expression for Db and substitute a and c and derivative of c to get Db.
At this point I simplify() and the dB term disappeared, and it was then that I noticed unexpected functions in the output, which I traced back to my having simplify() after I subs C1 into c. So at the moment I do not have the final production for b, but it should be down to a single equation and b(0)=0 will clearly be important. This resolution will have to wait until I get to my desktop.