<s>[INST] Find $f$ such that $f'(x)=ax^2+bx$, given the values of $f'(1)$, $f''(1)$, and $\int_0^2 f(x)\,dx$ The question is : Find the solution $f(x)$ if $f'(x)=ax^2+bx$, and 
(i) $f'(1)=6$, 
  (ii)  $f''(1)=18$,
  (iii) $\int_0^2 f(x)dx=18$.
My solution is:
According to $(i)$, we know $6=a+b$, and $a=6-b$.
Since $f''(x)=2ax+b$, and according to $(ii)$, we know $18=2a+b$.
Therefore, $b=-6, a=12$. And, $f'(x)=12x^2-6x$.
Now, we have
$$
f(x)=\int f'(x)dx=\int (12x^2-6x)dx=4x^3-3x^2+C
$$
According to $(iii)$,
$$
\bigl |_0^2 f(x) = 4*8-12-0=20
$$
It means $(\bigr|_0^2 f(x) )+ C=18$, and $C=-2$. The solution of $f(x)$ is $4x^3-3x^2-2$.
But the correct answer should be $4x^3-3x^2+5$. Where is my mistake?
Thank you!!
 [/INST] If I may suggest, stay symbolic as long as you can.
You are given $f'(x)=ax^2+bx$, so by simple integration $f(x)=\frac{a x^3}{3}+\frac{b x^2}{2}+c$ and by differentiation $f''(x)=2ax+b$ and $\int_0^2f(x)dx=\frac{a x^4}{12}+\frac{b x^3}{6}+c x$
Now apply the conditions and get $$f'(1)=a+b=6$$ $$f''(1)=2a+b=18$$ $$\int_0^2 f(x)dx=\frac{4 a}{3}+\frac{4 b}{3}+2 c=18$$ You easily see that the first conditions give $a=12$ and $b=-6$. The last condition gives you the value of $c=5$.
</s>