ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 19 Jul 2015 07:13:44 -0500Solving this DE containing an integralhttps://ask.sagemath.org/question/28643/solving-this-de-containing-an-integral/I am trying to solve
$$ 0 = - \partial_a F(a)-e(a)F(a) + \int_0^{a} e(a')\partial_a F(a') d a' + n $$
optimally, without specifying e(a). But if necessary (as I guess), e(a) = k1*exp(k2*a). Here's my code:
var('a b k_1 k_2 n')
e(b) = k_1*exp(b*k_2)
F = function('F', a)
g(b) = e(b)*diff(F,b,1)
de = -diff(F, a, 1) - e(a)*F(a) + g(b).integral(b, 0, a) + n
y = desolve(de, F, ivar=a); y
And the output is
(_C + n*Ei(k_1*e^(a*k_2)/k_2)/k_2)*e^(-k_1*e^(a*k_2)/k_2)
However, I believe that something is wrong with my integral, it is not doing what I expect it to do. For example, if I change the integration boundary to 1:
de = -diff(F, a, 1) - e(a)*F(a) + g(b).integral(b, 0, a) + n
I will still get the same result:
(_C + n*Ei(k_1*e^(a*k_2)/k_2)/k_2)*e^(-k_1*e^(a*k_2)/k_2)
Where am I going wrong?FooBarSun, 19 Jul 2015 07:13:44 -0500https://ask.sagemath.org/question/28643/