Compute a stochastic integral I am trying to do the following stochastic integral
$$
\int_0^T \mu(B_s) dB_s - \frac{\int_0^T (\mu(B_s))^2 ds}{2}
$$
where $ \{ B_t \}$ is a standard Brownian motion, and $\mu(x) = \frac{\beta}{2x} (x^2 - \frac{4\gamma}{\sigma^2} - \frac{1}{ \beta})$.
I currently only know how to integrate when the integrands are constant, i.e. $\mu$.is constant function. I was wondering how to integrate under more complicated case as above.
Thanks and regards!
 A: You can do this by different methods. One way I like is to use Ito's formula.
For instance, consider $B_t^2$.
$d(B_t^2) = 2B_t dB_t + dt$.
Hence, $\int_{0}^{T} B_t dB_t = \frac{1}{2} \int_{0}^{T} (d(B_t^2) - dt) = \frac{1}{2} (B_T^2 - T)$.
Similarly, consider $B_t^3$.
Use Ito's formula,
$d(B_t^3) = 3B_t^2 dB_t + 3 B_t dt$.
Hence, $\int_{0}^{T} B_t^2 dB_t = \frac{1}{3} \int_{0}^{T} (d(B_t^3) - 3 B_t dt) = \frac{1}{3} (B_T^3 - 3 \int_{0}^{T} B_t dt)$.
Use these to get your desired answer. (Plug in for $\mu(B_s)$ and then simplify to get integrals of the form $\int_{0}^{T} B_t^2 dB_t$ and $\int_{0}^{T} B_t dB_t$)
Hope this helps.
A: 
To finish the job initiated by  Sivaram Ambikasaran, first you can say that $\mu(x)=\alpha x+ \beta 1/x$ 
The stochastic integral term with $\beta=0$ case is answered by Sivaram Ambikasaran. 
For the $\alpha=0$ case you have using Itô's lemma :
$dLnB_t= \frac{1}{B_t}dB_t-\frac{1}{2.B_t^2}dt$
So integrating this gives you :
$\beta.\int_0^T \frac{dB_s}{B_s}=\beta.(Ln(\frac{B_T}{B_0})+1/2\int_0^T \frac{1}{B_s^2}ds)$ 
If you start your Brownian Motion at 0, the problem is not well defined. If $B_0\not=0$ then returning to the intial problem (still with $\alpha=0$) you have :
$ \int_0^T \mu(B_s) dB_s - \frac{\int_0^T (\mu(B_s))^2 ds}{2} =
Ln(\frac{B_T}{B_0})+\frac{\beta.(1-\beta)}{2}.\int_0^T \frac{1}{B_s^2}ds$ if I am not mistaken.
For the general case ($\alpha\not= 0$ and $\beta\not= 0$) just adds the solutions ( i.e. respectively for $\alpha=0$ and $\beta=0$) and also add the cross product term from $\int_0^T (\mu(B_s))^2 ds$ (which should be something like $-T.\alpha.\beta$).
Regards
