Solution (source code)

= Solution

Set $x=1.5+e^y$. Every finite unconstrained value of $y$ then gives an allowed point with $x>1.5$:

``
def transformed(y):
    return f(1.5 + np.exp(y[0]))


result = opt.minimize(transformed, x0=[0.0])
x_interior = 1.5 + np.exp(result.x[0])
x_best = min([1.5, x_interior], key=f)
print(x_best, f(x_best))
``
Explicitly checking $x=1.5$ covers the boundary omitted by the exponential transformation. The minimum is \b[$x\simeq2.164817$, $f(x)\simeq0.614056$], whereas $f(1.5)\simeq1.59810$.

<Constraint reparameterization> enforces feasibility but does not remove nonconvexity. In this example, $f\geq1$ up to the next negative-sine lobe, the <derivative> has one minimum in that lobe, and for $x\geq4\pi/5$ the envelope gives $f(x)\geq1-e^{-16\pi^2/125}\simeq0.7173$. Thus later oscillations cannot improve on the displayed constrained minimum.