If $a,b,x$ are real and $$f(x)=2(a-x)(x+\sqrt{x^2+b^2}),$$ then find the maximum value of $f(x)$.

Is there any method to solve this question without differentiation because using differentiation I am getting an ugly expression.