<s>[INST] If $f(1)$ and $f(i)$ real, then find minimum value of $|a|+|b|$ A function $f$ is defined by $$f(z)=(4+i)z^2+a  z+b$$ $(i=\sqrt{-1})$for all complex number $z$ where $a$ and $b$ are complex numbers. If $f(1)$ and $f(i)$ are both purely real, then find minimum value of $|a|+|b|$
Now
$f(1)=4+i+a+b$ which means imaginary part of $a+b=-1$ and $f(i)=-4-i+a \cdot i+b$ which gives imaginary part of $a \cdot i+b=1$  but how to proceed further to find desired value?
 [/INST] Setting $a = a_1 + i a_2, b = b_1 + i b_2$ for four real unknowns $a_k, b_k$.
Real $f(1) = 4 + i + a + b$ and real $f(i) = -4 - i + a i + b$ give the equations
$$
\text{Im}(f(1)) = 1 + a_2 + b_2 = 0 \\
\text{Im}(f(i)) = -1 + a_1 + b_2 = 0
$$
Then we have to minimize
$$
g(a_1, a_2, b_1, b_2) 
= \lvert a \rvert + \lvert b \rvert 
= \sqrt{a_1^2 + a_2^2} + \sqrt{b_1^2 + b_2^2}
$$
which reduces to a function of two unknowns if we apply the two equations above:
$$
b_2 - 1 = - a_1 \\
b_2 + 1 = - a_2 \\
h(b_1, b_2) 
= \sqrt{(b_2 - 1)^2 + (b_2 + 1)^2} + \sqrt{b_1^2 + b_2^2} \\
= \sqrt{2b_2^2 + 2} + \sqrt{b_1^2 + b_2^2} \\
\ge \sqrt{2}
$$
Here is a graph:

$h$ is shown in red colour, $\partial_{b_1} h$ in blue and $\partial_{b_2} h$ in green.
So we have a minimum at $b = 0$ which implies $a = 1-i$ via the constraints.
The minimal value for $\lvert a \rvert + \lvert b \rvert $ is $\sqrt{2}$.
</s>