Question:Functional equation to formal power series

Is there a simple way, given a functional equation satisfied by a formal power series, to obtain the explicit form (the Taylor expansion) of this formal power series? For example, my input is "f(x)=1+x*f2(x)", and I want to have as the output: "1+x+2x2+5x3+O(x4)".