Post Reply 
Incorrect answer in indefinite integration (HP Prime)
02-28-2024, 07:00 PM
Post: #1
Incorrect answer in indefinite integration (HP Prime)
integral(ln(x+2)dx
answer: x*ln(x+2)-x+2*ln(x+2)-2

why is there a -2 at the end?
Find all posts by this user
Quote this message in a reply
02-29-2024, 08:55 AM (This post was last modified: 02-29-2024 09:50 AM by rkf.)
Post: #2
RE: Incorrect answer in indefinite integration (HP Prime)
(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.
Find all posts by this user
Quote this message in a reply
02-29-2024, 02:25 PM
Post: #3
RE: Incorrect answer in indefinite integration (HP Prime)
I had the same thought. Was wondering how/why XCAS came up with a constant equaling 2 as opposed to something else!
Find all posts by this user
Quote this message in a reply
02-29-2024, 02:46 PM
Post: #4
RE: Incorrect answer in indefinite integration (HP Prime)
Maybe it is the airspeed velocity of an unladen African sparrow?
Find all posts by this user
Quote this message in a reply
02-29-2024, 03:42 PM (This post was last modified: 02-29-2024 03:55 PM by carey.)
Post: #5
RE: Incorrect answer in indefinite integration (HP Prime)
(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 :)
Find all posts by this user
Quote this message in a reply
02-29-2024, 04:31 PM
Post: #6
RE: Incorrect answer in indefinite integration (HP Prime)
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).

Prime G2, 15C CE
Find all posts by this user
Quote this message in a reply
02-29-2024, 04:42 PM
Post: #7
RE: Incorrect answer in indefinite integration (HP Prime)
(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}
\)
Find all posts by this user
Quote this message in a reply
02-29-2024, 05:47 PM
Post: #8
RE: Incorrect answer in indefinite integration (HP Prime)
(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?

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
02-29-2024, 06:23 PM
Post: #9
RE: Incorrect answer in indefinite integration (HP Prime)
Not really mysterious, it's a linear change of variable.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)