Untitled

                Never    
from math import sin, pi, e, log
import pylab

x1 = 0
x2 = 0.9
x3 = 0.1
p1 = 0.2
a = 0.3
E = 0.0001

def mysin(x):
    x %= 2 * pi
    i, lasts, s, fact, num, sign = 1, 0, x, 1, x, 1
    while abs(s - lasts) > E:
        lasts = s
        i += 2
        fact *= i * (i-1)
        num *= x * x
        sign *= -1
        s += num / fact * sign
    return s

def y(x):
    if x <= p1:
        return e ** (a * mysin(pi * x / a)) * mysin(pi * x) ** 2
    else:
        return log(a * x * x + (a + x) ** 0.5)

x = x1
allx = []
ally = []
while x <= x2:
    allx.append(x)
    ally.append(y(x))
    x += x3
pylab.plot(allx, ally, 'o')
pylab.show()