# Using integration to find the total change in angle between two tangent lines

1. May 19, 2012

### JamesGold

That is, adding up the differential changes in angle between two arbitrarily chosen points on a function, to find the total change in angle between the tangent lines of those two points. How can this be done?

2. May 19, 2012

### tiny-tim

Hi JamesGold!

Find the angle as a function of something (a coordinate, or the arc-length), and integrate.

3. May 19, 2012

### Charles49

The angle θ a tangent line of f(x) makes at x=a is equal to arctan(f'(a)).

4. May 19, 2012

### Charles49

So it would be $$\int_{a}^b\arctan(f'(x))dx$$

5. May 19, 2012

### JamesGold

Thanks for the responses.

Intuitively, why the dx? arctan(f'(x)) gives you an angle, so why multiply it by dx?

Also, arctan(f'(x)) gives you the angle with respect to the x-axis, right? Would it be possible to do this problem by finding the change in angle between a tangent line at point x = a and a tangent line at point x = a + h, where h is inifinitely small, and then using this method to integrate across the entire function?

6. May 19, 2012

### Charles49

The dx is just there to tell you that the integration is done with respect to x. Can you attach a picture so I know what angle you are interested in?

7. May 19, 2012

### Charles49

And yes that angle is with respect to the x-axis

8. May 19, 2012

### Charles49

Are you interested in the curvature of the function? If so there are formula for finding curvature.

9. May 19, 2012

### JamesGold

But doesn't the dx serve an actual purpose when finding the area under a function as opposed to just indicating that the integration is done with respect to x? When finding the area under a function, the dx represents the width of an infinitely thin rectangle of height f(x). So why doesn't the dx serve an actual purpose in arctan(f'(x))dx?

Here's my diagram:

The goal is to find the total angle ∅ between the tangent lines at the two blue points. I'm saying one way to do this is to start the two red points at the left blue point, and have them leap frog along the function until they reach the right blue point. Each time one red point leaps over the other, the angle d∅ between their tangent lines is found. If we add up all these d∅s from the left blue point to the right blue point, we should end up with the total angle ∅, right?

I realize that this is trivial because to find the angle between the tangent lines at the blue points one could simply place them end to end and measure the angle between them, but this is much more fun!

10. May 19, 2012

### Charles49

Let's say the end points are a and b. Let $$x_0=a, x_1=a+h, x_2=a+2h\cdots, x_n=a+nh=b$$ where $$h=\frac{b-a}{n}.$$ The angle as indicated in the diagram is $$\pi-\arctan(f'(x))-\arctan(f'(x+h)).$$ So you have to calculate$$\pi-\lim_{n\rightarrow\infty}\sum_{i=0}^n\bigg(\arctan(f'(x_i))+\arctan(f'(x_i+h))\bigg).$$

I think this is right but you can check numerically...

11. May 19, 2012

### JamesGold

Cool! Three questions:

Can that be represented by an integral?

Will this work for any two points on any (continuous) function?

Must n go to infinity, or can it be any finite number and still get the right answer? If n = 1, isn't that the same as putting the tangent lines at A and B end to end?

Last edited: May 19, 2012
12. May 19, 2012

### Charles49

1. Go here:

http://en.wikipedia.org/wiki/Riemann_integral

and look under: Riemann Sums. You'll see that you need a width. So I don't think you can write it as a Riemann Integral.

2. The slope can't be zero because the tangent line never intersects the x-axis and the concept of angle is meaningless. Therefore, try to avoid choosing critical points.

3. Yes if n=1, that's same as putting the tangent lines at a and b end to end. The following Mathematica code is useful for numerical results:

f[x_] := -x^2 + 4;
a := 0;
b := 1;
n := 1000;
h := (b - a)/n;
x[i_] := a + i*h;
Pi - (NSum[ArcTan[f'[x]] + ArcTan[f'[x + h]], {i, 0, n}])

13. May 20, 2012

### Vargo

If arctan f'(x) represents the angle at point x (which it does), then the differential change of angle at point x is the derivative of that: f''(x)/(1+f'(x)^2). So you can integrate that across your interval to find the net change in angle.

If you are interested in the total change (as opposed to net change), then you want your differential change to always be positive, so simply put absolute value bars around the integrand.