Good morning,
I have an ODE linear system $\dot{\vec f} = A \vec f$ depending parametrically to two real parameters, s and p. I'd like to get a density map of the solutions of $f_A/(f_A+f_B)$ at $t=20$, in the space of parameters ${s, p} \in [0; 1]$.
I post my try:
rA = 2.1
rB = 1.0
fA := ParametricNDSolveValue[{A'[ t] == (rA - 1 + p) A[ t] + s B[t], B'[t] == (1 - p) A[t] + (rB - s) B[t], A[0] == 2, B[0] == 2}, A, {t, 0, 20}, {{s, p} \[Element] Reals}]
fB := ParametricNDSolveValue[{A'[ t] == (rA - 1 + p) A[ t] + s B[t], B'[t] == (1 - p) A[t] + (rB - s) B[t], A[0] == 2, B[0] == 2}, B, {t, 0, 20}, {{s, p} \[Element] Reals}]
DensityPlot[fA[s][p]/(fA[s][p] + fB[s][p]), {s, 0, 1}, {p, 0, 1}]
The plot I obtain can't be what I need, as I never ask Mathematica to evaluate the functions at $t=20$. I'm really new to Mathematica and I've the impression to be missing something really basic about its semantics. I hope to learn from your help, thank you in advance!