The problem statement is
Find the Greatest value of $(a+x)^3 (a-x)^4$ for any real value of $x$ numerically less than $4$.
So, I basically differentiated the given equation which give the value of $x$ as $-\frac{a}{7}$.
My answer is matching but I cant figure out why it was given that $x$ is numerically less than $4$.
Denote the objective function by $f$. The derivative is $$f'(x)=(x-a)^3(x+a)^2(7x+a)$$
In the case where $a$ is positive, we have $f'(x)>0$ if $x<-a/7$ or if $x>a$. Thus the function is:
Thus $-a/7$ is a local maximizer, but there is no global maximizer if we do not bound $x$ above because $\lim_{x\to\infty}f(x)=\infty$. If we assume $x\leq 4$, then we have two candidates for the global maximizer: $-a/7$ and $4$. It turns out that which one is the global maximizer depends on the value of $a$.