merging the equations of the line I have two equations for plotting the line. How can I merge them to get a single equation?
$$\begin{align}y&=7.515x^3 - 10.229x^2 +5.05x, \,\, x \leq 0.5\\
y&=0.185x + 0.815, \,\,                  0.5<x\leq1\end{align}$$
I actually require equation of a line passing through following points:
$(0,0),\,(0.2,0.7), \,(0.5,0.9),\,(1,1)$
But connecting lines between these points should be straight, especially between the last two points.

We can find such polynomial (not a line) as follows:
$$y=y_1\left(\frac{x-x_2}{x_1-x_2}\cdot\frac{x-x_3}{x_1-x_3}\cdot\frac{x-x_4}{x_1-x_4}\right)+y_2\left(\frac{x-x_1}{x_2-x_1}\cdot\frac{x-x_3}{x_2-x_3}\cdot\frac{x-x_4}{x_2-x_4}\right)+y_3\left(\frac{x-x_1}{x_3-x_1}\cdot\frac{x-x_2}{x_3-x_2}\cdot\frac{x-x_4}{x_3-x_4}\right)+y_4\left(\frac{x-x_1}{x_4-x_1}\cdot\frac{x-x_2}{x_4-x_2}\cdot\frac{x-x_3}{x_4-x_3}\right)$$ where $x_1=0,y_1=0,x_2=0.2,y_2=0.7,x_3=0.5,y_3=0.9,x_4=1,y_4=1$.
Substituting these values in the above expression of $y$, we get:
$$y=0\left(\frac{x-0.2}{0-0.2}\cdot\frac{x-0.5}{0-0.5}\cdot\frac{x-1}{0-1}\right)+0.7\left(\frac{x-0}{0.2-0}\cdot\frac{x-0.5}{0.2-0.5}\cdot\frac{x-1}{0.2-1}\right)+0.9\left(\frac{x-0}{0.5-0}\cdot\frac{x-0.2}{0.5-0.2}\cdot\frac{x-1}{0.5-1}\right)+1\left(\frac{x-0}{1-0}\cdot\frac{x-0.2}{1-0.2}\cdot\frac{x-0.5}{1-0.5}\right)$$
Simplifying this expression, we get:
$$y=\frac{175}{12}x(x-0.5)(x-1)-12x(x-0.2)(x-1)+\frac{5}{2}x(x-0.2)(x-0.5)$$
This expression can be further simplified as convenient to you.
Here is the graph of this curve where is passes through the four given points.

By the way, this is Lagrange's polynomial interpolation method which Erdos Yi mentioned in his answer.
I know this question was asked in June, but I liked to share the solution, you or other may need to know how to do Lagrange's polynomial interpolation. Hope this helps.
