# How to solve differential equation with integrals in it?

I have a question. Is it possible so solve an equation of this type:

$$\frac{dt}{dx} + \sin ^2(t)=-\frac{1}{2} \int_0^x \sin (2 t) \, ds$$

Is it possible to do some iterations to try come close to actual solution?

To get an "analytic" solution, you could differentiate your ODE and use DSolveValue. First, use t[x] instead of t so that the x dependence is explicit.

ode = t'[x] + Sin[t[x]]^2 == -Integrate[Sin[2 t[s]], {s, 0, x}]/2;


Differentiate:

dode = D[ode, x];
dode //TeXForm


$t''(x)+2 t'(x) \sin (t(x)) \cos (t(x))=-\frac{1}{2} \sin (2 t(x))$

DSolveValue[dode, t, x] //InputForm


Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.

Function[{x}, InverseFunction[Integrate[2/(-1 - ProductLog[-E^(-4*C - 2*Cos[K]^2)]), {K, 1, #1}] & ][ x + C]]

You didn't share complete information, such as, initial condition, the limits on the integral and the "actual solution".

Anyways, here is a way to solve this Integro-Differential Equation,

ODE = D[t[x], x] + Sin[t[x]]^2 == -0.5*Integrate[Sin[2*t[s]], {s, 0, x}]

newODE1 = D[t[x], x] + Sin[t[x]]^2 == -0.5*t0[x]

newODE2 = t0'[x] == D[Integrate[Sin[2*t[s]], {s, 0, x}], x]

sol = NDSolve[{newODE1, newODE2, t == 1, t0 == 0}, {t[x],
t0[x]}, {x, 0, 4}];

Plot[Evaluate[{t[x], t0[x]} /. sol], {x, 0, 4}, PlotRange -> All]

• Do you think there is a possibility to solve this analitically, so I get a general solution? – Cro Simpson2.0 Sep 7 '18 at 17:31