# Homework Help: Area enclosed between this graph and the x-axis

1. Aug 21, 2016

### Saracen Rue

1. The problem statement, all variables and given/known data
For the relationship $|y| = cos(x-y), -\frac {π} {2} ≤ x ≤ \frac {π} {2}$, use calculus and algebra to determine the total area enclosed between the graph and and the x-axis.

2. Relevant equations
Area between points $a$ and $b$ = $∫_a^b f(x)dx$ given that $f(x)>0$ for $a<x<b$

3. The attempt at a solution
I'm honestly at a completely loss for this one. I tried solving the equation for x, giving me $x = arccos(|y|)+y$. However doing this causes me to loose a portion of the graph so I'm not really sure what to do.

2. Aug 22, 2016

### DuckAmuck

The inverse of an absolute value is a ±.
So the formula you want is
$$x = arccos(\pm y) + y$$

3. Aug 22, 2016

### Staff: Mentor

No, that's not true. An equation involving an absolute value can be rewritten as an equation involving ±, but this is only indirectly related to inverses. For example, if |y| = 2x, then y = ±2x.
The equation of this problem can be rewritten as y = ±cos(x - y), or as the two equations y = cos(x - y) and y = -cos(x - y).

4. Aug 22, 2016

### Saracen Rue

Ah, thank you. However, in order to find an area using an integral I need to have the relationship in terms or x or y only. After fiddling around with them a bit I believe that x=arccos(|y|)+y and x=-arccos(|y|)+y works. If we define them as f(y) = arccos(|y|)+y and g(y) = -arccos(|y|)+y, then shouldn't $∫_\frac {-π} {2}^\frac {π} {2}(g(y)-f(y))dy$ give me the correct area? I tried it but I keeps giving me an an undefined value; have I done something wrong?

5. Aug 22, 2016

### Staff: Mentor

Yes, because $\cos^{-1}(\pi/2)$ is undefined.
Also, the domain for y = $\cos^{-1}(x)$ is $[0, \pi/2) \cup (\pi/2, \pi]$, so you'll need to do something about the $-\pi/2$ integration limit. You can probably exploit the symmetry of the integrand (it's symmetric about the y-axis) to rewrite the integral as $2\int_0^{\pi/2} g(y) - f(y)dy$, but it's still an improper integral, so you'll need to take the limit for the upper limit of integration.

6. Aug 22, 2016

### Saracen Rue

I worked out that the range of the relationship is [-1, 1], so if I find the inverse of f(y) and g(y), which would just become f(x) and g(x), then the domain of the two relationships would be [-1, 1]. I then found the integral for $\int_{-1}^1 f(x)-g(x)dx$, which gave me the answer of 4 square units. Does this sound like it could be right to you?

7. Aug 22, 2016

### Staff: Mentor

This doesn't seem correct to me, but maybe it's just the way you wrote it. f-1(y) isn't equal to f(x), and similarly for g and its inverse.
If x = f-1(y), then f(x) = y (assuming both f and f-1 are one-to-one), but $f(x) \ne f^{-1}(y)$.

8. Aug 22, 2016

### Saracen Rue

Okay I'll try rewriting it like this:
We have the equations x=arccos(|y|)+y and x=-arccos(|y|)+y. To find the inverse we swap x and y around, giving us $y_1=arccos(|x|)+x$ and $y_2=-arccos(|x|)+x$. The domain of $y_1$ and $y_2$ is [-1,1], so if we integrate the relations over this domain we should get the area enclosed between the graphs (and due to symmetry along the y=x axis the area between the two inverse graphs should be the same as the area between the two original graphs).

EDIT: I've done a little something up on Desmos Graphing Calculator to try to show what I'm talking about: https://www.desmos.com/calculator/ybd2d2lxm1

Last edited: Aug 22, 2016
9. Aug 22, 2016

### Staff: Mentor

That's NOT how you find the inverse of a function. Given an equation x = g(y), to find g-1, you would solve the equation for y, which would give you y = g-1(x). Swapping x and y isn't really relevant here.

10. Aug 22, 2016

### Saracen Rue

I have always been taught that swapping x and y is how you find an inverse function; that is, reflecting the original function across the y=x axis. For example, if you have x = y^2-y+2, the inverse function IS y = x^2-x+2. If you just solve x = y^2-y+2 for y, you get $y=0.5(1\pm \sqrt {4x-7})$. This is just the same equation as the original just expressed differently, not an inverse.

11. Aug 22, 2016

### Ray Vickson

No. The inverse of $f(y) = y^2 - y + 2$ does not actually exist, because the equation $x = y^2 - y + 2$ is a quadratic in $y$, so has two roots
$$y_1 = y_1(x) = \frac{1}{2} + \frac{1}{2}\sqrt{4x-7} \;, y_2 = y_2(x) = \frac{1}{2} - \frac{1}{2}\sqrt{4x-7}$$
Either of these would be a legitimate inverse for part of the function $f(y)$, one for points $y$ to the left of the minimum of $f(y)$ and one for points to the right of the minimum.

You do NOT get the inverse by swapping $x$ and $y$ in the formula; you get the inverse by swapping the $x$ and $y$ axes in the graph of $y = f(x)$. In other words, turn your graph paper through 90°, so the y-axis points along the horizontal and the x-axis points along the vertical. Now your graph would show $f^{-1}(y)$.

I hope nobody taught you what you claimed.

12. Aug 22, 2016

### Staff: Mentor

In my opinion, the business of switching x and y is not useful beyond the precalculus level. To find the inverse of a function, there is really only one step.

1. Starting from y = f(x), if possible, solve the equation for x, to get x = f-1(y). Ray's example shows that not all functions even have inverses.

The graphs of y = f(x) and x = f-1(y) are exactly the same. One equation gives the y value for a given x value. The other equation does the opposite, yielding the x value if the y value if given.

If you switch x and y in one of the equations, which is usually unnecessary at the level of calculus and beyond, you'll get two graphs, each of which is the reflection across the line y = x. Unfortunately, this relatively unimportant step is the only one that is remembered by beginning students.

13. Aug 22, 2016

### Ray Vickson

The example I showed was that given by the OP in post #10; he just happened to get it wrong.

14. Aug 23, 2016

### Saracen Rue

I'm honestly at a complete loss as to what you're talking about. Swapping x and y in the formula has the exact same effect as swapping the x and y axes. Look at what I mean:

Say you're given the equation x = y^2-y+2 and are asked to determine the total area enclosed between x=1.75 and x=8. Using your method, you have to solve for y and then set up an integral in which you subtract the bottom part of the equation from the top part as shown in the picture above. However, if you instead simply swap the x and y variables around in the equation and set up an integral subtracting x^2-x+2 from 8, then you get the exact same area as the first method. This method is much more time efficient as you don't need to rearrange the equation and it's easier to do without the use of a calculator.

15. Aug 23, 2016

### Saracen Rue

Please ignore: This was an accidental double post.

16. Aug 23, 2016

### Staff: Mentor

Sure, we get this. It's not that these are two operations with the same effect -- they are in fact the same operation. But swapping x and y is not the same as finding the inverse of a function.
All you're doing is exploiting the symmetry of the parabola. The parabola that opens to the right is symmetric about the x-axis. The parabola that opens up is symmetric about the y-axis.

Here's an example of how the inverse can be used.
Find the area that is bounded by the graph of x = y2 (y ≥ 0), between x = 0 and x = 4.
Solution 1, using horizontal strips
$\int_0^2 4 - x dy = \int_0^2 4 - y^2 dy = 4y - \frac{y^3}{3}|_0^2 = 8 - 8/3 = 16/3$
Here I'm using x = f(y) = y2 in the integrand.

Solution 2, using vertical strips
$\int_0^4 y dx = \int_0^4 x^{1/2} dx = \frac 2 3 x^{3/2} |_0^4 = \frac 2 3 \cdot 8 = 16/3$
Here I'm using the inverse, y = f-1(x) = x1/2 in the integrand.
Since y ≥ 0, the function f is one-to-one, and the equations x = y2 and y = $\sqrt{x}$ are equivalent (exactly the same graph).

Last edited: Aug 23, 2016
17. Aug 23, 2016

### BvU

When I have to do this kind of thing I always try to draw a picture. First a few points (x=0 $\Rightarrow$ y= ... and y = 0 $\Rightarrow$ x = ...)
Then I grab excel to give me a few more points (cumbersome: the solver only lets me do one cell at a time). So I grab an equation solver and get something like:

(the y = cos(x-y) is the same rotated 180 degrees around the origin).

I don't loose a portion of the graph. Is it because I don't use the arccos function ?

18. Aug 25, 2016

### SammyS

Staff Emeritus
That looks like the correct result for the area enclosed by the given relation for -π/2 ≤ x ≤ π/2 .

I don't know why it says between the graph and x-axis. The graph of the relation itself encloses a region.

19. Aug 25, 2016

### Staff: Mentor

Probably. The domain of cos() is all reals. The domain of arccos() is $[0, \pi]$.