CCommons

The picture that made integration by parts stop feeling like a trick

I used the formula for a year without knowing why it was true. One sketch on the back of a rough copy fixed that.

Arjun Nair12th Sample

9 Oct 2026 Β· 5 min read

Photo: AlixSaz Β· CC BY-SA 4.0 Β· via Wikimedia Commons

For about a year I treated integration by parts like a spell. Pick uu, pick dvdv, write the formula, hope. The answers came out right often enough. But if you had asked me why the formula is true, I would have said "product rule, something something", and that bothered me more than it should have. (Probably a personal problem.)

Then one Sunday I was avoiding a problem set and drew a graph just to look busy. It clicked. Here it is.

The formula, the boring way

∫u dv=uvβˆ’βˆ«v du\int u\,dv = uv - \int v\,du

You get it by differentiating a product, d(uv)=u dv+v dud(uv) = u\,dv + v\,du, integrating both sides and rearranging. That is a perfectly valid proof. It is also a proof that makes you feel nothing.

The picture

Forget xx and yy for a moment. Take a plane where the horizontal axis is uu and the vertical axis is vv. These are just two quantities that both change as you walk along a curve. Say the curve starts at the origin and climbs to a point (u,v)(u, v), going up and to the right the whole way.

Draw the rectangle with corners (0,0)(0,0) and (u,v)(u,v). Its area is uvuv. Now the curve cuts that rectangle into two pieces:

  • the piece under the curve, sitting on the uu-axis. Slice it into thin vertical strips of height vv and width dudu. Its area is ∫v du\int v\,du.
  • the piece to the left of the curve, hugging the vv-axis. Slice it into thin horizontal strips of length uu and height dvdv. Its area is ∫u dv\int u\,dv.

Those two pieces tile the rectangle with nothing left over. So

∫u dv+∫v du=uv\int u\,dv + \int v\,du = uv

and moving one term across gives the formula. That is all it is. Integration by parts is "area of the whole rectangle minus the part you did not want". If the horizontal strips are painful to add up, add up the vertical strips instead and subtract.

This also explains the [uv][uv] term in definite integrals. It is the rectangle, evaluated at the two ends:

∫abu dv=[uv]abβˆ’βˆ«abv du\int_a^b u\,dv = \big[uv\big]_a^b - \int_a^b v\,du

What it says about choosing uu

The question is never "which letter is uu". The question is: which way of slicing leaves me with an easier integral? The LIATE rule is just a ranking of which function becomes simpler when you differentiate it (that one goes in uu) and which one stays friendly when you integrate it (that one goes in dvdv).

Example 1: ∫xex dx\int x e^x\,dx

u=xu = x, dv=exdxdv = e^x dx, so du=dxdu = dx and v=exv = e^x.

∫xex dx=xexβˆ’βˆ«ex dx=xexβˆ’ex+C=ex(xβˆ’1)+C\int xe^x\,dx = xe^x - \int e^x\,dx = xe^x - e^x + C = e^x(x-1) + C

Check: ddx[ex(xβˆ’1)]=ex(xβˆ’1)+ex=xex\frac{d}{dx}\big[e^x(x-1)\big] = e^x(x-1) + e^x = xe^x. Good.

Why not the other way? With u=exu = e^x and dv=x dxdv = x\,dx you get x22exβˆ’βˆ«x22ex dx\frac{x^2}{2}e^x - \int \frac{x^2}{2}e^x\,dx. The new integral is worse than the old one. Wrong slicing.

Example 2: ∫ln⁑x dx\int \ln x\,dx, the one that looks impossible

There is no visible product. So make one: ∫ln⁑xβ‹…1 dx\int \ln x \cdot 1\,dx. Take u=ln⁑xu = \ln x, dv=dxdv = dx, so du=dxxdu = \frac{dx}{x}, v=xv = x.

∫ln⁑x dx=xln⁑xβˆ’βˆ«xβ‹…1x dx=xln⁑xβˆ’x+C\int \ln x\,dx = x\ln x - \int x\cdot\frac{1}{x}\,dx = x\ln x - x + C

Definite version: ∫1eln⁑x dx=[xln⁑xβˆ’x]1e=(eβˆ’e)βˆ’(0βˆ’1)=1\int_1^e \ln x\,dx = \big[x\ln x - x\big]_1^e = (e - e) - (0 - 1) = 1.

And here the rectangle gets a bonus. Take the curve y=ln⁑xy = \ln x from (1,0)(1,0) to (e,1)(e,1). Under it is ∫1eln⁑x dx=1\int_1^e \ln x\,dx = 1. To its left (as a function of yy, the curve is x=eyx = e^y) is ∫01ey dy=eβˆ’1\int_0^1 e^y\,dy = e - 1. Add them: 1+(eβˆ’1)=e1 + (e-1) = e, and the rectangle term is uvuv at the end minus uvuv at the start, eβ‹…1βˆ’1β‹…0=ee\cdot 1 - 1\cdot 0 = e. It matches. That is why the integral of an inverse function can be computed from the integral of the function.

Example 3: the one that eats itself

I=∫exsin⁑x dxI = \int e^x \sin x\,dx. Do by-parts twice.

First: u=sin⁑xu = \sin x, dv=exdxdv = e^x dx:

I=exsin⁑xβˆ’βˆ«excos⁑x dxI = e^x\sin x - \int e^x\cos x\,dx

Second, on the new integral: u=cos⁑xu = \cos x, dv=exdxdv = e^x dx, so du=βˆ’sin⁑x dxdu = -\sin x\,dx:

∫excos⁑x dx=excos⁑x+∫exsin⁑x dx=excos⁑x+I\int e^x\cos x\,dx = e^x\cos x + \int e^x \sin x\,dx = e^x\cos x + I

Put it back: I=exsin⁑xβˆ’excos⁑xβˆ’II = e^x\sin x - e^x\cos x - I, so 2I=ex(sin⁑xβˆ’cos⁑x)2I = e^x(\sin x - \cos x) and

I=ex2(sin⁑xβˆ’cos⁑x)+CI = \frac{e^x}{2}(\sin x - \cos x) + C

One rule that saved me: in the second step, take the same type of function as uu that you took in the first step (trig both times). If you switch halfway, you undo your own work and end up with I=II = I, which is true but not useful.

Repeated by-parts: the table trick

For ∫x2ex dx\int x^2 e^x\,dx you would apply the formula twice. A faster way is to write two columns: keep differentiating x2x^2 until you hit zero, keep integrating exe^x alongside, and multiply diagonally with alternating signs.

signdifferentiate x2x^2integrate exe^x
+x2x^2exe^x
βˆ’2x2xexe^x
+22exe^x
βˆ’00exe^x

Multiply each entry in the middle column by the entry one row below it in the right column: +x2exβˆ’2xex+2ex+x^2 e^x - 2x e^x + 2e^x. So ∫x2ex dx=ex(x2βˆ’2x+2)+C\int x^2e^x\,dx = e^x(x^2 - 2x + 2) + C. It only works when one function dies by repeated differentiation, but that is exactly the case that eats the most time in a mock.

Things that cost me marks

  1. Losing the minus sign in front of ∫v du\int v\,du when dudu itself is negative (like cos⁑x\cos x above).
  2. Forgetting to apply the limits to the [uv][uv] term before subtracting the second integral.
  3. Not differentiating my answer at the end. It takes twenty seconds and catches nearly every sign error.

That is the post. If you only keep one thing: draw the rectangle once, by hand, and the formula stops being something you memorise.

WhatsAppPost on X

12 responses

Sign in to join the conversation.

  • [+]Ishaan Bose11thSampleΒ· 10d ago

    bro. I have done this formula like 200 times and never knew it was just a rectangle. my maths sir literally says "ILATE and pray" which is not a method, it's a religion. saving this post

    • [+]Arjun Nair12thSampleΒ· 10d agoAuthor

      LIATE is a fine heuristic, it works most of the time. It just fails when you meet something it has no opinion on. The picture is for those days.

  • [+]Diya Menon11thSampleΒ· 10d ago

    ahh I'm PCB so integration isn't even in my syllabus, but my brother does JEE and I read the whole thing anyway because the rectangle is so neat 😭 is this the same idea as area under a velocity-time graph? like strips of height v and width dt?

    • [+]Arjun Nair12thSampleΒ· 10d agoAuthor

      Yes exactly the same idea. Area under the v-t graph is ∫v dt\int v\,dt, thin strips of height vv and width dtdt. Here the only new thing is that you also cut the rectangle the other way, with horizontal strips, and the two cuts have to add up to the whole.

  • [+]Vivek Mishra12thSampleΒ· 10d ago

    I was stuck on e^x sin x for one full day. I kept changing my choice of u each time and got I = I. I thought I discovered something big lol. Your point about same type of function in the second step explains everything. Thank you.

  • [+]Harsh Gupta12thSampleΒ· 10d ago

    arjun posts a proof and gets 40 reactions, I post a joke and get 3. anyway "the integral that eats itself" is going in my notes as ouroboros integral. also real question, in the x e^x one I forgot +C and my teacher cut a mark. is that normal or is my teacher just evil

    • [+]Aman YadavDropperSampleΒ· 10d ago

      Normal. In an indefinite integral the +C is part of the answer. No C, no full marks. Put it in the last line of every indefinite integral. Habit.

  • [+]Rohan Sharma11thSampleΒ· 9d ago

    for xe^x I picked u = e^x and dv = x dx and got an xΒ² floating around. so my answer is wrong right?

    • [+]Kabir Joshi11thSampleΒ· 9d ago

      not wrong, just going the wrong way. you would get x²/2 · e^x minus ∫ x²/2 · e^x dx, and that second integral is harder than what you started with. so you can't finish it by that route. swap the roles and x vanishes after one differentiation

  • [+]Neel Chatterjee12thSampleΒ· 9d ago

    The inverse function bit is my favourite part. One small thing, the rectangle tiling is literal only when the curve is monotone like in your sketch. For a general curve it still holds but you have to count the areas with signs.

    • [+]Arjun Nair12thSampleΒ· 9d agoAuthor

      Right, signed areas. I left it out to keep the post short, but yes, that is the careful version.

  • [+]Meera Patel11thSampleΒ· 8d ago

    A suggestion for anyone practising definite integrals by parts: evaluate [uv][uv] at both limits first and only then subtract the second integral. I have seen many students apply the limits to only one of the two terms, and it is the most common avoidable error on my worksheets.

More from Arjun Nair