Question: How can I make subs here replace this specific variable, and why doesn't it work if it works for the other variables?

Why am I not able to replace O(h^3), and in what other way can I achieve the result (I want to get the coefficients of the f(x), D(f)(x), and D^(2)(f)(x) variables).

Q(h);
1 /          /                                       2    / 3\\
- |alpha[-2] \f(x) - 2 D(f)(x) h + 2 @@(D, 2)(f)(x) h  + O\h //
h \                                                            

   + alpha[0] f(x)

              /                     9                 2    / 3\\\
   + alpha[3] |f(x) + 3 D(f)(x) h + - @@(D, 2)(f)(x) h  + O\h /||
              \                     2                          //


NULL;


subs(f(x) = 1, D(f)(x) = 0, (D@@2)(f)(x) = 0, O(h^3) = 0, collect(Q(h), f(x)));
                         /     / 3\\            /     / 3\\
    alpha[0]   alpha[-2] \1 + O\h // + alpha[3] \1 + O\h //
    -------- + --------------------------------------------
       h                            h                      

 

Please Wait...