02-28-2024, 07:00 PM

02-29-2024, 08:55 AM

(02-28-2024 07:00 PM)ReinXXL Wrote: [ -> ]integral(ln(x+2)dx

answer: x*ln(x+2)-x+2*ln(x+2)-2

why is there a -2 at the end?

Why not? Indefinite integrals are always +/- any arbitrary constant value, of which "-2" is a special case. I assume this results from Xcas implementation.

02-29-2024, 02:25 PM

I had the same thought. Was wondering how/why XCAS came up with a constant equaling 2 as opposed to something else!

02-29-2024, 02:46 PM

Maybe it is the airspeed velocity of an unladen African sparrow?

02-29-2024, 03:42 PM

(02-29-2024 02:46 PM)KeithB Wrote: [ -> ]Maybe it is the airspeed velocity of an unladen African sparrow?

And because the airspeed velocity is negative (-2), perhaps it is flying backwards :)

02-29-2024, 04:31 PM

Why -2?

You can rewrite the answer x*ln(x+2)-x+2*ln(x+2)-2 as (x+2)*ln(x+2)-(x+2).

You can rewrite the answer x*ln(x+2)-x+2*ln(x+2)-2 as (x+2)*ln(x+2)-(x+2).

02-29-2024, 04:42 PM

(02-28-2024 07:00 PM)ReinXXL Wrote: [ -> ]why is there a -2 at the end?

We can consider the singularity at \(x=-2\) a natural lower bound of the definite integral.

This choice of the integral constant makes it \(0\) at that value:

\(

\begin{align}

F(x)

&= \int_{-2}^{x} \log(t+2) \; \mathrm{d}t \\

\\

&= (t+2) \log(t+2) - t \Big|_{-2}^x \\

\\

&= (x+2) \log(x+2) - x - 2 \\

\end{align}

\)

02-29-2024, 05:47 PM

02-29-2024, 06:23 PM

Not really mysterious, it's a linear change of variable.