HP Forums
HP Prime integration issue - 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: HP Prime integration issue (/thread-16308.html)



HP Prime integration issue - LCieParagon - 02-12-2021 08:04 PM

Hello, when I try to integrate 1/(x^3-2) with respect to x, I see in my answer something with rootof(). When I try to retype this into the calculator, I receive a syntax error, presumably because the first argument has 6 parameters, and the second argument has 7 parameters. What does this even mean? What does this function even mean? There's clearly an elementary representation of this integral (just type it on wolfram alpha, for example). I can't even replicate or approximate the result because I get a syntax error when even pressing enter to see what it looks like in long form. What's happening here?


RE: HP Prime integration issue - Albert Chan - 02-12-2021 10:53 PM

Hi, LCieParagon

I asked this before, and you are not supposed to see rootof(...) in Prime.
see https://www.hpmuseum.org/forum/thread-11429-post-105773.html#pid105773

For your example, we can do a simple substitution, x = 2^(1/3)*y, dx = 2^(1/3)*dy
(y integral result copy/pasted from Hp Prime emulator)

I = ∫(1/(x^3-2), x)
  = 2^(1/3)/2 * ∫(1/(y^3-1), y)
  = 2^(1/3)/2 * (-atan((y+1/2)/(1/2*√3))/√3 - 1/6*ln(y^2+y+1) + 1/3*ln(abs(y-1)))

Back substitute y = x/2^(1/3), and we are done.

---

The reason for substitution is y^3-1 = (y-1)*(y-w)*(y-w²), where w = exp(i*2*pi/3)

3/(y^3-1) = 1/(y-1) + w/(y-w) + w²/(y-w²)

I = 2^(1/3)/6 · ∫(3/(y^3-1), y)
  = 2^(1/3)/6 · (ln(y-1) + w·ln(y-w) + w²·ln(y-w²))


RE: HP Prime integration issue - LCieParagon - 02-13-2021 02:02 AM

(02-12-2021 10:53 PM)Albert Chan Wrote:  Hi, LCieParagon

I asked this before, and you are not supposed to see rootof(...) in Prime.
see https://www.hpmuseum.org/forum/thread-11429-post-105773.html#pid105773

For your example, we can do a simple substitution, x = 2^(1/3)*y, dx = 2^(1/3)*dy
(y integral result copy/pasted from Hp Prime emulator)

I = ∫(1/(x^3-2), x)
  = 2^(1/3)/2 * ∫(1/(y^3-1), y)
  = 2^(1/3)/2 * (-atan((y+1/2)/(1/2*√3))/√3 - 1/6*ln(y^2+y+1) + 1/3*ln(abs(y-1)))

Back substitute y = x/2^(1/3), and we are done.

---

The reason for substitution is y^3-1 = (y-1)*(y-w)*(y-w²), where w = exp(i*2*pi/3)

3/(y^3-1) = 1/(y-1) + w/(y-w) + w²/(y-w²)

I = 2^(1/3)/6 · ∫(3/(y^3-1), y)
  = 2^(1/3)/6 · (ln(y-1) + w·ln(y-w) + w²·ln(y-w²))

“I’m not supposed to see this in Prime”, but I do see it, and it doesn’t make sense to me. I can use simple algebra to do this integral by hand and while it looks pretty ugly, it’s actually not difficult to do. I can’t even simplify it because one matrix has a 7 parameter argument, and one 6. I can’t replace the empty spot with a 0, else I receive a wrong answer. There is no literature on rootof function on the HP Prime. I consider this a bug and should be fixed. I’m a math professor and this result is less than useless to me especially when a competitor calculator computes it in seconds.