Post Reply 
Funny math problem to calculate the Pin Number for a credit card.
08-11-2021, 03:40 PM (This post was last modified: 08-12-2021 10:45 AM by Albert Chan.)
Post: #4
RE: Funny math problem to calculate the Pin Number for a credit card.
(08-10-2021 05:41 AM)Steve Simpkin Wrote:  Here is the solution using a Casio fx-991EX.
I had to set the upper limit to .9999999999 (stored in Y) to avoid an error on this model.

FYI, integrand singularity (at x=1) is removable.

(3x^3-x^2+2x-4) / √(x^2-3x+2)
= (x-1)*(3*x^2+2*x+4) / √((x-1)*(x-2))
= -(1-x)*(3*x^2+2*x+4) / √((1-x)*(2-x))       // integral limits 0 to 1, √(1-x), √(2-x) both real
= -(3*x^2+2*x+4) * √(1-1/(2-x))

XCAS> -∫((3*x^2+2*x+4) * √(1-1/(2-x)), x=0..1)

(-202*sqrt(2) + 135*ln(2*sqrt(2)+3))/16        // ≈ -2.98126694401

---

Proof: assume integral have the form f*√g

(f*√g)' = f'*√g + f/(2√g)*g' = (f'*g + f*g'/2) / √g

XCAS> f := a*x^2+b*x+c          // integrand numerator is cubic, thus quadratic f
XCAS> g := x^2 - 3x + 2           // integrand denominator = √g
XCAS> coefs := e2r(f'*g + f*g'/2)

[3*a, (-15*a+4*b)/2, (8*a-9*b+2*c)/2, (4*b-3*c)/2]

Ignore constant term for now, we match 3 coefs with 3 unknown.

XCAS> a, b, c := 1, 13/4, 101/8
XCAS> coefs

[3, -1, 2, -199/16]                     // = [3, -1, 2, -4] - [0, 0, 0, 135/16]

I1 = preval(f*√g, 0, 1) = subst(-f*√g, x=0) = -101/8*√(2)

I2 = ∫(1/√(x^2-3x+2), x=0..1)            // let y = 2*(x-3/2)=2x-3, dy = 2 dx
    = ∫(1/√(y^2-1), y=-3 .. -1)             // ∫(1/√(y^2-1), y) = -ln(abs(-y+sqrt(y^2-1)))
    = ln(2*√(2)+3)

I = I1 + 135/16 * I2 = -101/8*√(2) + 135/16*ln(2*√(2)+3)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Funny math problem to calculate the Pin Number for a credit card. - Albert Chan - 08-11-2021 03:40 PM



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