What is the maximum expected Sharpe ratio by combining two assets into a portfolio? Given two assets that have expected excess returns of 7 and 4.
Also, given their expected co-variance matrix 
$$
        \begin{bmatrix}
        2 & 1 \\
        1 & 1 \\
        \end{bmatrix}
$$
What is the maximum expected Sharpe ratio that you can achieve by combining two assets into a portfolio?
I appreciate the elaborated solution with the explanation. Thanks
 A: Let A and B be the two assets. From the Covariance Matrix, you get
$\sigma_A^2 = 2$, $\sigma_B^2 = 2$ $Cov(A,B) = 1$
Expected Excess Returns, $R_A = 7$, $R_B = 4$
Let A and B be have weights $w_A$, $w_B$ in the portfolio.
Now
Variance of the Portfolio $Var(P) = w_A^2\sigma_A^2+w_B^2\sigma_B^2+2w_Aw_BCov(A,B)$
$\sigma_P = \sqrt{Var(P)}$
$R_P = w_{A}R_A + w_{B}R_B$
$$Sharpe Ratio= \frac{R_P}{\sigma_P}$$
USing the above information set up a solver to find $w_A$ and $w_B$.  The below image illustrates and find the optimal solution that will maximize sharpe ratio.

A: You can do by calculus also:
Take down all the definitions and let $w_A = w$ and $w_B = 1-w$
Then $Var(P) = 1+w^2$
$\sigma_P = \sqrt{1+w^2}$
$R_P = 7w + 4(1-w) = 3w+4$
Now
Sharpe Ratio $S = \frac{3w+4}{\sqrt{1+w^2}}$
If you take $\frac{dS}{dw}$ and set it to 0, 
and find the above derivative using quotient rule, you will get
$w = 0.75$ and hence $1-w = 0.25$  
Thus$ w_A = 0.75 $ and $w_B = 0.25$, Substitute back in S you will get the maximum Sharpe Ratio to be equal to $5.00$
