2015-07-19 07:13:44 -0500 asked a question 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) = k1exp(k2a). 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? 2015-05-14 23:24:52 -0500 received badge ● Student (source) 2015-05-13 09:45:32 -0500 received badge ● Editor (source) 2015-05-13 09:41:29 -0500 asked a question Solve DE with secondary function I want to solve $-F''(a) + g(a)( F'(a) - F(a)$ where $g(a)$ is logistic. My code is a = var('a') g(a)= 1 /(1 + e^(-(a))) F = function('F', a) de = -diff(F,a, 2) + g(a)*(diff(F,a,1) - F(a)) y = desolve(de, F); y  But I get an error (at the end of the post). If I remove e(a) from the de-term, I get a solution. What do I have to take into account when I add the second function? TypeError: no canonical coercion from to Symbolic Ring