calculus – Find all continuous functions satisfying a property


enter image description here

1: This problem above was posted by our sir who claims he couldn’t get the solution to it . I tried this problem for half an hour but didn’t reach any proper conclusion. So I need help to solve this

My initial idea : First we observe that f(0) = 0 . Then I wanted to integrate the second summand by using the idea every continuous function is Riemann integrable and so by using a function g and h such that h”(x) = g'(x) = f(x) and the equation I got was h”(x) + xh'(x) – h(x) + (x^2 + c) = 0 (Here c = h(0) a constant). These types of differential equations are indeed solvable , but the fact the form after solving comes out to be complex and I doubt that this will actually resolve the problem to something good.

Hence I request for a help in this problem