Integrability of a function (Darboux) Question:   

  
*
  
*Let $f: [a,b] \to \mathbb{R}$ and assume $0 \leq f(x) \leq B$ for  $x\in [a,b]$.   Show that 
  $$U(f^2,P) -L(f^2,P) \leq 2B\ ( U(f,P) - L(f,P) )$$
  for all partitions $P$ of $[a,b]$. 
  
*Show that if $f$ is integrable on $[a,b]$, then so is $f^2$ [no positivity assumption here].

I found this hint buried in the latex file my prof gave me.

(Hint: $f(x)^2 -f(y)^2 = (f(x) + f(y)) \cdot (f(x) -f(y))$.)

It really wasn't easy to put it to good use...
$$\begin{align}
U(f^2,P) -L(f^2,P) &= (U(f,p) + L(f,p)) \cdot (U(f,p) - L(f,p)) \\
&\leq (|U(f,p)| + |L(f,p)|) \cdot (U(f,p) - L(f,p))
\end{align}$$
We know $|U(f,p)|\geq |L(f,p)|$, and since $f(x) \leq B$, $|f(x)| \leq B$ for all $x \in [a,b]$ where $B \in \mathbb {R}$.
Knowing that  $|L(f,p)| \leq |U(f,p)|\leq |f(x)| \leq B$, we get:
$$(B + B) \cdot (U(f,p) - L(f,p)) = 2B\ (U(f,P) - L(f,P))$$
Hence $U(f^2,P)-L(f^2,P) \leq 2B\ (U(f,P) - L(f,P))$.
Anyone agree with me?

Part 2)
Theorem: Let $f:[a,b] \to [c,d]$ be Daraboux-integrable and $g:[c,d] \to \mathbb {R}$ be continuous. Then the composition $g \circ f$ is Daraboux-integrable. 
Let $g=x^2$, so that $g \circ f=f^2$. Since $g$ is continous on $[c,d]$ for all $c,d \in \mathbb {R}$, $f^{2}$ is integrable as long as $f$ is integrable on $[a,b]$ by the theorem above.
 A: $\color{red} \cdots$ $U(f,p)$ generally refers to the "upper sum," not a step function.  Instead, define two step functions $s$ and $t$ over a partition $P$ such that $s(x) \le f(x) \le t(x)$.  Let $s$ be maximal while still requiring $s(x) \le f(x)$ and let $t$ be minimal.  Then $s^2$ and $t^2$ are step functions corresponding to $f^2$.
Your comment that "hence $U(f,p) \le B$" threw me off a bit.  You can simply conclude that $t(x) \le B$ since $f(x) \le B$ and $t$ is a step function taking values on $f$.

And I would recommend turning the inequality $[B+B]( U(f,p) - L(f,p) ) \le 2B ( U(f,p) - L(f,p) )$ into an equality.
Both parts give correct proofs (if we replace the instances of $U(f,p)$ and $L(f,p)$ appropriately with $s$ and $t$).  However, it sounds like your professor may want you to prove the second part directly from the first.  If that is the case, simply pay attention to the fact that $U(f,p) - L(f,p) \to 0$ as the partitions become finer, while $2B$ is a fixed constant.  $\color{red} *$ But be careful, because you have to drop the positivity assumption for this part.

There are a few lines in there which are unnecessary.  For instance, you write:

$U(f,p)|≥|L(f,p)|$ since $f(x)≤B |f(x)|≤B$ for all $x∈[a,b]$ where $B∈\mathbb R$

While all these statements are true, and you should definitely mention $U(f,p) \ge L(f,p)$, the second part is both unnecessary and trivial and makes the proof a bit messy (since it makes it sound like the first statement follows from the second).  So I would recommend getting rid of the part beyond "since."
You also write:

$|L(f,p)|≤|U(f,p)|≤|f(x)|≤B$

By using the absolute value signs, do you mean to be taking the maximum value of the functions?
A: The first question (without positivity assumpation) is answerred here.
As for the second part it is easy modulo results of the first question. Let $\small P$ be some partition of $\small P$. Since $\small f$ is integrable then 
$$
\small
\lim\limits_{\mu(P)\to 0}(U(f,P)-L(f,P))=0
$$
From inequality of the first question we get 
$$
\small
0\leq \lim\limits_{\mu(P)\to 0}(U(f^2,P)-L(f^2),P)\leq \lim\limits_{\mu(P)\to 0}2B(U(f,P)-L(f),P))=2B\lim\limits_{\mu(P)\to 0}(U(f,P)-L(f),P))=0
$$
Hence $\small \lim_{\mu(P)\to 0)}(U(f^2,P)-L(f^2),P)=0$. Since partition $\small P$ was arbitrary this means that $\small f^2$ is integrable.
