Find a function that satisfies certain conditions Is it possible to find a function with certain conditions?
$$x \gt 0 \Rightarrow f(x) \gt 0$$
$$x = 0 \Rightarrow f(x) = 0$$
$$f'(1)+f'(6)=a \ne 0$$
$$f'(2)+f'(5)=0$$
$$f'(3)+f'(4)=0$$
$$f'(1) \ne 0$$
$$f'(2) \ne 0$$
$$f'(3) \ne 0$$
$$f'(4) \ne 0$$
$$f'(5) \ne 0$$
$$f'(6) \ne 0$$
I don't care how function behaves when $x<0$.
The function as well as its derivative should be continuous.
Possibly, there is some approach to build such function.
Thank you.
 A: There is a construction of a smooth function verifying exactly your conditions :

Lemma 1
  Let $\varepsilon>0$. There exists a smooth function $g_{\varepsilon}$ such that $$  
g_{\varepsilon}(x)\left\{ 
\begin{aligned} 
=1 &\quad  \text{if} \quad  x\leq 0\\
\in (0,1)&\quad  \text{if} \quad  x\in (0,\varepsilon) \\
=0 & \quad  \text{if} \quad  x\in [\varepsilon,+\infty)
\end{aligned}
\right.
$$ 

Proof :
Let $$h(x)=\left\{ 
\begin{aligned} 
0 &\quad  \text{if} \quad  x\leq 0\\
e^{-\frac1x} & \quad  \text{if} \quad  x>0
\end{aligned}
\right.
$$ 
Then $h$ is a smooth function (proof by induction on $n$ over $h^{(n)}$) strictly increasing for $x>0$.
It is sufficient to define 
$$ g_{\varepsilon}(x):=\frac{h(h(\varepsilon)-h(x))}{h(h(\varepsilon))}. $$

Remark: $g_{\varepsilon}$ is a smooth approximation of $1_{(-\infty,0]}$.

$ $

Lemma 2
  For all $a,b\in \mathbb{R}$ and $\varepsilon>0$, There exists a smooth function $f_{a,b;\varepsilon}$ such that 
  $$f_{a,b;\varepsilon}(x)\left\{ 
\begin{aligned} 
=1 &\quad  \text{if} \quad  x\in [a,b]\\
\in (0,1)&\quad  \text{if} \quad  x\in (a-\varepsilon,a)\cup (b,b+\varepsilon) \\
=0 & \quad  \text{if} \quad  x\in (-\infty,a-\varepsilon]\cup [b+\varepsilon,+\infty)
\end{aligned}
\right.
$$ 

Proof :
Let $g_{\varepsilon}$ define as in Lemma 1. We just have to define
$$ f_{a,b;\varepsilon}:= g_{\varepsilon}(-x+a)\times g_{\varepsilon}(x-b)$$

Remark: $f_{a,b;\varepsilon}$ is a smooth approximation of $1_{[a,b]}$.

Main function (for the original question)
$$\boxed{ f(x):=(2|a| +ax)f_{\frac{1}{4}, \frac32+\frac14;\frac14}(x)+f_{\frac{3}{2}, \frac52;\frac14}(x) +f_{\frac{5}{2}, \frac72;\frac14}(x) +  f_{\frac{7}{2}, \frac92;\frac14}(x)+  f_{\frac{9}{2}, \frac{11}2;\frac14}(x)+  f_{\frac{11}{2}, \frac{13}2;\frac14}(x)+  g_{\frac14}(-(x-\tfrac{13}2))}$$
Since in particular $f'(1)=a$, $f'(2)=f'(3)=f'(4)=f'(5)=f'(6)=0\ $ and $f(0)=0$, and $f(x)>0$ for $x>0$, you will have indeed
$$x \gt 0 \Rightarrow f(x) \gt 0$$
$$x = 0 \Rightarrow f(x) = 0$$
$$f'(1)+f'(6)=a \ne 0$$
$$f'(2)+f'(5)=0$$
$$f'(3)+f'(4)=0$$
Main function (for the actual edited question)
$$\boxed{ 
\begin{align*}
f(x):=& \Big(|a|+\frac{a}{2}x\Big)f_{\frac{1}{4}, \frac32+\frac14;\frac14}(x)+(6-x)f_{\frac{3}{2}, \frac52;\frac14}(x)  +(6-x)f_{\frac{5}{2}, \frac72;\frac14}(x)+ xf_{\frac{7}{2}, \frac92;\frac14}(x) \\
&+  xf_{\frac{9}{2}, \frac{11}2;\frac14}(x)+  \Big(6|a|+\frac{a}{2}x\Big)f_{\frac{11}{2}, \frac{13}2;\frac14}(x)+  g_{\frac14}(-(x-\tfrac{13}2))
\end{align*}
}
$$
Which is a smooth function verifying (since $f'(1)=f'(6)=\frac{a}2$, $f'(2)=f'(3)=-1$,  $f'(4)=f'(5)=1$, and we still have $f(x)>0$ for $x>0$ and $f(0)=0$)   all the following 
$$x \gt 0 \Rightarrow f(x) \gt 0$$
$$x = 0 \Rightarrow f(x) = 0$$
$$f'(1)+f'(6)=a \ne 0$$
$$f'(2)+f'(5)=0$$
$$f'(3)+f'(4)=0$$
$$f'(1) \ne 0$$
$$f'(2) \ne 0$$
$$f'(3) \ne 0$$
$$f'(4) \ne 0$$
$$f'(5) \ne 0$$
$$f'(6) \ne 0$$
Is that good for you?
A: (The following refers to the state of the question on 03/10/18, 15:00 MEZ.)
We shall first construct the function $g(x):=f'(x)$, whereby we have to distinguish the two cases  (i) $a>0$, (ii) $a<0$. The "provisional" functions
$$\eqalign{h_1(x)&:=(x-2)(x-3)(x-4)(x-5),\cr
h_2(x)&:=(x-2/3)(x-2)(x-3)(x-4)(x-5)(x-19/3)\cr}$$
are symmetric with respect to the vertical $x=3.5$; furthermore $$h_i(2)=h_i(3)=h_i(4)=h_i(5)=0\qquad(1\leq i\leq 2)\ ,$$ 
$$h_1(1)=h_1(6)>0,\quad h_2(1)=h_2(6)<0\ ,$$
see the following figure.

It follows that the functions
$$\eqalign{g_1(x)&:=h_1(x)+10(x-3.5)\cr g_2(x)&:=h_2(x)+10(x-3.5)\cr}$$
satisfy
$$g_i(2)=-g_i(5)\ne0,\quad g_i(3)=-g_i(4)\ne0,\quad g_1(1)+g_1(6)>0, \quad g_2(1)+g_2(6)<0\ .$$
For both $g_i$s the function
$$f(x):=\int_0^x g_i(t)\>dt$$
satisfies all requirements apart from $f'(1)+f'(6)=a$ for the given $a$. Select the proper $g_i$ according to the sign of $a$ and scale the resulting $f$ by the proper positive factor in order fulfill  this last condition as well. The resulting $f$s then look as follows:

A: I think it is entirely possible.
What we need is a cubic-like function starting at $(0,0)$, which has a local maximum turning point at $x\in(1,2)$, a local minimum turning point at $x\in(3,4)$ above the $x$-axis and increasing after that.
This is so that 


*

*the function starts at the origin

*the function is always above $0$ when $x>0$

*there are no turning points at $x=1,\cdots,6$ so each of $f'(x)\neq0$ is fulfilled

*the function is increasing at $x=1$ and $x=6$ so $f'(1)+f'(6)\neq0$.

*the function is increasing at $x=2$ and decreasing at $x=5$ so given the slopes are the same, we have $f'(2)+f'(5)=0$

*the function is decreasing at $x=4$ and increasing at $x=5$ so given the slopes are the same, we have $f'(3)+f'(4)=0$

A function that satisfies all but one condition is $$f(x)=x\left(x-7+\frac{\sqrt{46}}2\right)^2$$ The only flaw is that $f'(2)+f'(5)=12\neq0$. For a visualisation see here.

However, I'm sure that there are many other more complicated functions out there that satisfy this criterion as well.
A: (The following applies to the state of the question as of March $12$, $2018$; $11$ am UTC-$6$.)
I'm gonna start with $$g(x)=0.02x^2\big((x-3.5)^2+0.2\big)(7-x)^2.$$ The leading coefficient $0.02$ is just so that $g$ isn't that big on $[0,7]$, while the $+0.2$ in the middle is so that $g(3.5)>0$. Function $g$ is continuous, smooth and symmetrical at $x=3.5$ . However, $g$ is not perfect, since $g'(1)+g'(6)=0$ and $g(7)=0$. As a workabout, I will add to $g$ two gaussian functions that shall act as somewhat-continuous indicator functions, namely $$\exp\left(-\frac{(x-1.1)^2}{0.01}\right) +\exp\left(-\frac{(x-7)^2}{0.01}\right).$$ The first gaussian is for breaking the symmetry around $x=1$; the choice of $1.1$ (which is the peak of the gaussian) is so that the slope at $x=1$ is positive (the slope at the peak is zero). The second gaussian is just for ensuring positiveness around $x=7$. Lastly, I propose this function: $$f(x)= \exp\left(-\frac{(x-1.1)^2}{0.01}\right) +\exp\left(-\frac{(x-7)^2}{0.01}\right) +0.02x^2\big((x-3.5)^2+0.2\big)(7-x)^2.$$ Remarks: $f'(1)+f'(6)\approx 7.3576$ and $f(7)>0$; also, $f$ satisfies most of the OP's desired properties ($a$ who?), specially the part where we don't care how $f$ is for $x<0$. ;-) 
