How to solve numerically an equation when NSolve is not appropriate?

Hi,
This is my code:

    In[1]:= f[x_] := x^2
    In[2]:= g[a_, b_] := NIntegrate[f[x], {x, a, b}]
    In[3]:= g[1, 2]     
    Out[3]= 2.33333  
    In[4]:= NSolve[g[1, b] == 3, b]
    During evaluation of In[4]:= NIntegrate::nlim: x = b is not a valid limit of integration. >>

I am unable to Numericaly Solve for the variable b.

Marcel

FindRoot works with polynomials and related symbolic expressions.

In[7]:= f[x_] = x^2;
g[a_?NumberQ, b_?NumberQ] := NIntegrate[f[x], {x, a, b}]

In[9]:= FindRoot[g[1, b] == 3, {b, 1}]

Out[9]= {b -> 2.15443}

Hi,
Thank you for your help!
Marcel