I am planning to solve this ode numerically by ode45 in MATLAB. But there is an integral and as the $ y $ parameter is not calculated, I can not calculate the integral and it is not possible to solve this differential equation.
$$ \frac{d^2y}{dt^2}+\left(1-\exp\left[{{-0.5y^2+\int_{0}^{1}\frac{y^2}{2}dt}}\right]\right)y=0$$
I would be appreciated it if you could help me how to solve it in MATLAB numerically.
Regards
I would suggest the following procedure. Since $\int_0^1(y^2/2)\,dt$ is a positive number, look at the equation $$ y''+\bigl(1-\lambda\,e^{-y^2/2}\bigr)y=0,\quad\lambda>0. $$ Solve it (with the appropriate initial and/or boundary conditions) for an initial value of $\lambda$, let $y_\lambda$ be its solution and let $e=\int_0^1(y_\lambda^2/2)\,dt-\lambda$. If $e=0$, you have found the solution. If not, change the value of $\lambda$. At first you do not know wether $\lambda$ has to increase or decrease to make $e$ smaller, but you can guess it after the second calculation. Keep doing this until you get $e=0$. This can be probably automated, but I do not know how.