Artificial intelligent assistant

Displacing a cosinus curve and keeping zero slope I am doing parametrization and in that regard I need to offset/displace one end of a cosinus curve up along the y-axis. The function I'm looking at is f(s)=cos(2*pi*s) with s ∈ [0..1] such that it starts and ends in the same point and have zero slope in the endpoints. I want to offset/displace one end of the cosinus with a value p1, therefore I changed the function to f(s)=cos(2*pi*s)+p1*s with s ∈ [0..1], but by adding the term p1*s, the slope at the ends is no longer zero. I've attached two images to show what I mean ![]( ![](

You may for example add a second term $\,\cos(\pi x)$ with an arbitrary coefficient $k$ : $$f_k(x):=\cos(2\pi\,(1-x))+k\cdot \cos(\pi\,(1-x))$$

For $k=2$ and $k=4$ we get :

!k=2

!k=4

(vertical shifting and scaling should be easy)

A more exotic (but with less 'liberties') solution is to use $\;\dfrac{\sin(5\pi\,(x-1)/2)}{5\pi\,(x-1)/2)}$ as illustrated :

!sin\(x\)/x

Hoping this helped,

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy ad3c94221536d5f9b627ee0c4de1e011