In linear Regression we have the following loss function :-
$$L(x)=\frac1{n}\left(\sum_{i=1}^n ((a+bx_i)-y_i)\right)^2$$
Hence, we can observe that L(x) is having a convex graph but when we use the same cost for the logistic regression the equation turns out to be the following :-
$$L_1(x)=\frac1{n}\left(\sum_{i=1}^n (\frac1{1+e^{-(a+bx_i)}}-y_i)\right)^2$$
Here, $y_i\epsilon (0,1)$ as they are the actual outputs in our data set while predicting the class. Now, when we try to plot $L_1(x)$ using $y_i=1$, I am getting the following loss function plot
which is not same as the loss function plot of logistic used in Linear regression's which is shown in the following link here Logistic regression - Prove That the Cost Function Is Convex.
If we are getting the same graph as the hypothesis function of logistic, how can we say that is a non-convex one ?