HP Forums
Incorrect answer in indefinite integration (HP Prime) - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Incorrect answer in indefinite integration (HP Prime) (/thread-21376.html)



Incorrect answer in indefinite integration (HP Prime) - ReinXXL - 02-28-2024 07:00 PM

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

why is there a -2 at the end?


RE: Incorrect answer in indefinite integration (HP Prime) - rkf - 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.


RE: Incorrect answer in indefinite integration (HP Prime) - lrdheat - 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!


RE: Incorrect answer in indefinite integration (HP Prime) - KeithB - 02-29-2024 02:46 PM

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


RE: Incorrect answer in indefinite integration (HP Prime) - carey - 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 :)


RE: Incorrect answer in indefinite integration (HP Prime) - chromos - 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).


RE: Incorrect answer in indefinite integration (HP Prime) - Thomas Klemm - 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}
\)


RE: Incorrect answer in indefinite integration (HP Prime) - toml_12953 - 02-29-2024 05:47 PM

(02-29-2024 03:42 PM)carey Wrote:  
(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 Smile

Or flying West?


RE: Incorrect answer in indefinite integration (HP Prime) - parisse - 02-29-2024 06:23 PM

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