# Integration not working

Can't seem to get this integration to work. s, n, b, b, l are all constants.

In[1]:= Integrate[Sin[n Pi x / l] (1 + s x - Sqrt[(x - Sqrt[1 - b])^2 + b]), {x, 0,l}, Assumptions -> Element[x, Reals]]


output is just the input, which indicates to me that mathematica doesn't like it, I'm unsure why.

Any help is greatly appreciated

• Why do you expect that there is a closed form solution? Not all integrals can be expressed in closed form. Mar 30, 2019 at 15:26
• From the form of your integral I guess you probably know more about the constants than you provide. For example, if you add Element[n, Integers] and l>0to the Assumptions the constant term and the term linear in x evaluate no problem. The problem is the square root piece. Dec 25, 2019 at 19:25
• "mathematica doesn't like it"---MA does not have the conscience therefore it cannot like or dislike something. Rather, integration cannot be performed analytically with the given assumptions. Therefore, the input is returned. Sep 16, 2021 at 4:44
• I'm pretty sure there's no known antiderivative for forms like $$\sqrt{1 -p x+ x^2} \sin (q x) ; q\neq 0$$ Sep 16, 2021 at 17:05

I think you have to set constants values for your Constants so the integral can be evaluated. Otherwise it return error for solution to set constant values.

n = 1;
s = 1;
l = 1;
b = 1;

f[x_] := Refine[
Sin[n Pi x/l] *(1 + s x - Sqrt[(x - Sqrt[1 - b])^2 + b]),
Assumptions -> {Element[x, Reals]}
]

Integrate[Simplify[f[x]], {x, 0, 1}] // N