I wanted to solve a differential equation involving a term with integration over its parameters. I want to call the integral expression but I get the wrong result:
ysol4 = ParametricNDSolveValue[{D[y[t], t] == y[t]*x +
Integrate[y[t], {x, 0, 1}],
y[0] == 1}, Integrate[y[t], {x, 0, 1}], {t, 0, 30}, {x}];
Plot[Evaluate[ysol4[0.1]], {t, 0, 1}]
I know that the result is wrong since the plot is sensitive to x. It should not be since I called the expression that is an integral of x. Any help will be appreciated.
Integrate[y[t], {x, 0, 1}]
is justy[t]
- in other words, it's treating y[t] like a constant in the integral. $\endgroup$