# How to solve an ODE containing the integral of the unknown [closed]

Is there a way to get an analytical solution for $$\psi(y)$$ for this second order ODE that contains the integral of $$\psi$$ over the domain:

$$\frac{d^2\psi}{dy^2}=a+b\int^{L}_{0}{\psi dy}$$

where $$a$$ and $$b$$ are constants, and with boundary conditions:

$$\psi(0)=\psi_1$$

$$\dfrac{d\psi}{dy}(L)=0$$

If not, how would you do it numerically? Do Matlab or Maple handle this?

• Are you sure the equation is right? Do you mean for the right hand side to be constant? Oct 1, 2022 at 9:11
• The right hand side is constant, so....? Oct 6, 2022 at 13:31

Well, I think that $$\frac{d^3 \psi}{dy^3}=0$$ since it is a definite integral. Now you only have to write $$\psi(y)$$ like a degree 2 polynomial and compute coefficients.
Elaborating a bit more, $$\psi(y)=Ay^2+By+C$$. But $$C=\psi_1$$, because of the initial condition. And $$\frac{d\psi}{dy}(L)=2AL+B=0,$$ and then $$B=-2AL$$.
Therefore $$\psi(y)=Ay^2-2ALy+\psi_1$$.
Substituting in the original equation, $$\frac{d^2\psi}{dy^2}=2A=a+b\int_0^L Ay^2-2ALy+\psi_1 dy$$ so $$2A=a+b(AL^3/3-2AL^3/2+\psi_1 L)$$ and you solve for $$A$$.
Let us solve $$\frac{d^2y}{dx}=a+b\int_{0}^{L} y(x) dx, dy/dx, y(0)=y_0, \frac{dy}{dx}(x=L)=0.....(1)$$ Let $$\int_{0}^{L} y dx=c,......(2)$$ then $$\frac{d^2y}{dx^2}=a+bc \implies \frac{dy}{dx}=(a+bc)x+u \implies y(x)=(a+bc)x^2/2+ux+v......(3)$$ We get $$v=y_0$$ and $$(a+bc)L=-u \implies c=\frac{\frac{-u}{L}-a}{b}.$$ Next from (2) and (3), $$c=\int_{0}^{L} [(a+bc)x^2/2+ux+v] dx,$$ you solve for $$c$$ and get it, then get $$u$$ and $$v$$ is already $$y_0$$.. Here, $$y_0,a,b, L$$ are fixed,