# Differential Equation help

I have a differential equation that looks like this:

 DSolve[(D[R[r, t], t])^2/(2*c) - (G*M1[r, z])/(
c^2*R[r, t]) - (λ*(R[r, t])^2)/3 - E1[r] == 0, ... "boundary conditions etc go here"]


I need to get R[r, t] using my values of E1[r] and M1[r]. However, my M1[r] is defined as:

M1[r_] :=  NIntegrate[(1 + f*Exp[-(r/y)^2])*(r)^2, r]


Herein lies the problem. I realise that DSolve uses Integrate internally, but the function I want it to solve has an NIntegrate in it and this causes problems. I'm not sure how else to evaluate an error function.

Any ideas?

-
This gives a solution in terms of an unresolved integral. Eventually. DSolve[(D[R[r, t], t])^2/(2*c) - (G*M1[r, z])/(c^2* R[r, t]) - (\[Lambda]*(R[r, t])^2)/3 - E1[r] == 0, R[r, t], t] – Daniel Lichtblau Feb 9 '13 at 22:33
What is the definition of f in your function M1[r_]? a unknown function? – can Feb 13 '15 at 7:51

Clear[r,f,y];

instead of using := NIntegrate because you seem to be looking for an indefinite integral there. For numerical integration you have to specify integration limits. The Clear is just added for safety before I define the function with = so that the integral will be done at that time, once and for all.
Wrapping the integral in Block[{r,f,y}, ...] would work, also, and limit the impact on the rest of the notebook. – rcollyer Feb 8 '13 at 21:41
For all I know, f in the question could in fact have a value - so it may be a moot point... – Jens Feb 8 '13 at 21:52