The command below:
DSolve[{s'[t] == l t, s[0] == 0}, {s[t]}, {t, 0, a}]
gives the error
DSolve::alliv
: The functions[t]
was specified without dependence on all the independent variables. Each function must depend on all the independent variables.
I am trying to make l
a constant coefficient. How do I get around this problem? I also want to be able to add the following:
Assumptions -> {l > 0, a > 0}
Edit: Removing a
causes the error to no longer appear but I want a
to be there. The following seems to work:
wrap_l = l
wrap_a = a
DSolve[{s'[t] == wrap_l t, s[0] == 0}, {s[t]}, {t, 0, wrap_a}]
Is there a cleaner solution? The command I want to achieve is
DSolve[{s'[t] == -λ s[t] p[t], p'[t] == μ s[t] p[t], s[0] == s0, p[0] == p0}, {s[t], p[t]}, {t, 0, tMax}, Assumptions -> {λ > 0, μ > 0, s0 > 0, p0 > 0, tMax > 0}]
DSolve[{s'[t] == l t, s[0] == 0}, s[t], t]
? $\endgroup$t
2. That does not work when there are multiple coefficients $\endgroup$t
" - then put it in the assumptions:DSolve[{s'[t] == l t, s[0] == 0}, s[t], t, Assumptions -> {0 < t < a, l > 0}]
. $\endgroup$DSolve[{s'[t] == -a s[t] p[t], p'[t] == b s[t] p[t]}, {s[t], p[t]}, t]
; you should be able to work backwards from there. $\endgroup$