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

  • 8
    $\begingroup$ Why do you expect that there is a closed form solution? Not all integrals can be expressed in closed form. $\endgroup$ Mar 30, 2019 at 15:26
  • $\begingroup$ 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. $\endgroup$
    – evanb
    Dec 25, 2019 at 19:25
  • $\begingroup$ "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. $\endgroup$
    – yarchik
    Sep 16, 2021 at 4:44
  • 1
    $\begingroup$ I'm pretty sure there's no known antiderivative for forms like $$\sqrt{1 -p x+ x^2} \sin (q x) ; q\neq 0$$ $\endgroup$
    – flinty
    Sep 16, 2021 at 17:05

1 Answer 1


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.