I've been trying to solve a system of nonlinear differential equation, but the conditions are a bit weird.
Two of the differentials equate to the same equation, but have different boundary conditions. The third differential equate to something else.
For the background on the problem I am trying to solve, it is related to concentration as a function of time for a reaction.
Here is the code I have put, which was more or less straightforward, but I keep getting True
. I've tried using DSolve
and NDsolve
, but I am unable to get a graph for my three concentration profiles (I do not need an analytical solution, just a graphical one).
NDSolve[{
A'[t] == -kf A[t] *B[t] + kb * c[t],
B'[t] == -kf A[t] *B[t] + kb * c[t],
c'[t] == kb * c[t] + kf A[t] B[t],
A[0] == 1, B[0] == 2, c[0] == 0},
{A, B, c}, {t, 100}]
kf
and kb
are constants I've already equated into my code.
But I keep resulting with:
NDSolve[{True, True, True, A[0] == 1, B[0] == 2, c[0] == 0}, {A, B, c}, {t, 100}]
I'm thinking it's because I'm multiplying two functions together, I haven't solved ODEs this way. I'd appreciate any input, or hints/guides/direction. Thanks!
If there is something unclear, or if I am lacking proper question asking etiquette please let me know!
Comments
Post a Comment