Reputation: 93
I want to describe the kinetics of a chemical reaction and my idea of a reaction model results (simplified) in a differential equation of the following form:
y1'(t)=y1(t)+y2(t)
where y1 is the from an experiment measured concentration of a reactant and y2 the measured concentration of a product over time. The differential equation has the following boundary conditions:
y1(0) = A
y2(0) = 0
now I couldn't solve the equation on my own, therefore, I tried to use Mathematica, but I always get an error when applying the second boundary condition:
In: DSolve[{y'[t] == k*y[t] + k2*y2[t], y[0] == A, y2[0] == 0}, y[t], t]
Out: DSolve::deqx: Supplied equations are not differential equations of the given functions.
Does that mean that this differential equation has no analytical solution? Anyone has an idea?
Thanks in advance!
Best regards Manuel
Upvotes: 1
Views: 761
Reputation: 8655
You only have one equation to solve a simultaneous equation.
For example, this works:-
vars = {x[t], y[t]};
eqns = {x'[t] == y[t], y'[t] == x[t]};
inits = {x[0] == 1, y[0] == 0};
DSolve[eqns, vars, t] // Simplify
sol = vars /. DSolve[Join[eqns, inits], vars, t][[1]]
Plot[sol, {t, 0, 2}]
But your simultaneous equation is underdetermined.
vars = {y[t], y2[t]};
eqns = {y'[t] == k*y[t] + k2*y2[t]};
inits = {y[0] == A, y2[0] == 0};
DSolve[eqns, vars, t] // Simplify
DSolve: There are more dependent variables than equations, so the system is underdetermined.
Upvotes: 0