# Working through spivak's calculus

1. Jul 16, 2011

### Shylock

i'm looking for some general advice on how to go about solving the problems in spivak's calculus text. i've just finished reading the first chapter, and while i've managed to solve some of the problems, i can't make sense out of most of them without referring to the solutions. how should i be going about this?

2. Jul 16, 2011

### Shylock

also, which of these problems do you think I should be able to do? i've taken calcI, intro to logic, symbolic logic, and intermediate logic I, with As in each.

3. Jul 16, 2011

### micromass

Staff Emeritus
Well, what question is troubling you? And what's the difficulty??

(I must add that Spivak's exercises can be quite difficult, so don't worry if you don't succeed at first)

4. Jul 16, 2011

### Shylock

i'm good till problem 13:

The maximum of two numbers x and y is denoted by max(x,y). Thus max(-1,3) = max(3,3) = 3 and max(-1,-4) = max(-4,-1) = -1. The minimum of x and y is denoted by min(x,y,). Prove that

max(x,y) = (x + y + ly - xl) / 2
min(x,y) = (x + y - ly - xl) / 2

Derive a formula for max(x,y,z) and min(x,y,z), using, for example,

max(x,y,z)=max(x,max(y,z)).

i'm pretty lost on where to start.

5. Jul 16, 2011

### micromass

Staff Emeritus
Well, let's prove that

$$\max(x,y)=\frac{x+y+|y-x|}{2}$$

there are three possibilities: x=y, x<y and y<x. What is |x-y| in all these cases??

6. Jul 16, 2011

### Shylock

0, y-x, -x-y?

7. Jul 16, 2011

### micromass

Staff Emeritus
Yes, and what do you get when you apply this in the formula

$$\frac{x+y+|y-x|}{2}$$

8. Jul 16, 2011

### Shylock

(x+y)/2 , y , 0

how do you know to check for the three possibilities?

9. Jul 16, 2011

### micromass

Staff Emeritus
Oh, sorry, the last one is not correct. That must be -x+y

So, plugging that in in our formula, we get

(x+y)/2, y, x

So, doesn't that prove our result?

10. Jul 16, 2011

### micromass

Staff Emeritus
Well, the absolute value is annoying, so we must eliminate it. The only way to do that is to do the prove in separate cases.

So, if we had somewhere $|x^2+y+z^2|+z$ for example, then we would have to split it up in the case that $x^2+y+z^2$ is < = or > than 0.

11. Jul 16, 2011

### Shylock

i still don't understand what we've just done

12. Jul 16, 2011

### micromass

Staff Emeritus
We have just calculated

$$\frac{x+y+|y-x|}{2}$$

depending on whether x<y, x=y or y<x...

13. Jul 16, 2011

### Shylock

i think i understand, but could you perhaps write the proof a bit more formally?

14. Jul 16, 2011

### micromass

Staff Emeritus
Well, if you understand, how would you write the proof then?

15. Jul 16, 2011

### Shylock

and does that that mean that the formula for max(x,y,z) =

x + (y+z + ly -zl)/2 ?

16. Jul 16, 2011

### micromass

Staff Emeritus
How did you find that??

17. Jul 16, 2011

### Shylock

proof by cases:
(i) if x=y then max(x,y) = (x+y)/2
(ii) if the x<y then max(x,y) = y
(iii) if x>y then max(x,y) = x
thus, for any numbers x,y max(x,y) = (x+y+ly-xl)/2

18. Jul 16, 2011

### Shylock

by substitution
although now that it think about it, that doesn't seem right

19. Jul 16, 2011

### micromass

Staff Emeritus
That seems ok. (also note that if x=y, then (x+y)/2=x)

Yes, substitution is the way to solve this. But I can totally not understand, how you arrived at that formula by substitution.

You know that

$$max{x,u}=\frac{x+u+|x-u|}{2}$$

So, what if I substitute u=max(x,y)?

20. Jul 16, 2011

### Shylock

i think i tried to do it in my head and i got lucky, haha
but now you've lost me