My problem is that I am trying to find a Numerical solution to a function of the form f(x,c)== K for x for some given values of c, K, and plot this function over a wide range of values of c.
My function f(x,c) is of the form Integrate[g(x,y,c),{y,a,b}], where a and b are some numerical values. This integration however cannot be evaluated symbolically in x and c,as g is a really complicated function and hence can only be performed numerically.
So if I write my function as f(x_,c_)= NIntegrate[g(x,y,c),{y,a,b}], I get some numerical value of f(x,c) for some numerical values of x and c. (If I write it as Integrate[g(x,y,c),{y,a,b}] I donot get any value for f(x,c)).
But with this form of the function, I cannot get any solution using NSolve, or FindRoot. (FindRoot doesn't converge, and it may not be practical if I plan to plot it for a wide range of values of c).
So at this point, plotting the solutions seems like a far fetched dream. I apologize for not providing details of the functions, as the function g arises from a lot of complicated functions.
Thanks in advance for your help
EDIT:
I decided to post my attempt, and some extent of the functions, based on one of the Solutions by Carl. For my case arh is a known function, and gamma and w are numerical values:
eqn = Inactive[Integrate][
g1[Hi[mx], a, mx]*mx, {a, 1, arh[\[Gamma], w]}] +
Inactive[Integrate][
g2[Hi[mx], a, mx]*mx, {a, arh[\[Gamma], w], \[Infinity]}] ==0.1198/(9.2*10^24);
Distribute /@ D[eqn, mx]
int0[Hi_, mx_?NumberQ] :=NIntegrate[g1[Hi, a, mx], {a, 1, arh[\[Gamma], w]}]
int1[Hi_, mx_?NumberQ] :=
NIntegrate[
Derivative[0, 0, 1][g1][Hi, a, mx], {a, 1, arh[\[Gamma], w]}]
int2[Hi_, mx_?NumberQ] :=
NIntegrate[
Derivative[1, 0, 0][g1][Hi, a, mx], {a, 1, arh[\[Gamma], w]}]
int02[Hi_, mx_?NumberQ] :=
NIntegrate[g2[Hi, a, mx], {a, arh[\[Gamma], w], \[Infinity]}]
int12[Hi_, mx_?NumberQ] :=
NIntegrate[
Derivative[0, 0, 1][g2][Hi, a, mx], {a,
arh[\[Gamma], w], \[Infinity]}]
int22[Hi_, mx_?NumberQ] :=
NIntegrate[
Derivative[1, 0, 0][g2][Hi, a, mx], {a,
arh[\[Gamma], w], \[Infinity]}]
My Functions are of the form
g1[Hi_, a_, mx_] :=
a^2/(Hrh[a, \[Gamma], w, Hi]*Trh[\[Gamma], Hi]^3) \[Sigma]vtotal[
a, \[Gamma], w, Hi, mx, Trh11] nXeq[a, \[Gamma], w, Hi, mx,
Trh11]^2;
g2[Hi_, a_, mx_] :=
a^2/(H[a, \[Gamma], w, Hi]*Trh[\[Gamma], Hi]^3) \[Sigma]vtotal[
a, \[Gamma], w, Hi, mx, T] nXeq[a, \[Gamma], w, Hi, mx, T]^2;
And I try to Solve:
sol = NDSolveValue[{(int0[Hi[mx], a, mx] +
mx (int1[Hi[mx], mx] +
Derivative[1][Hi][mx] int2[Hi[mx], mx])) + (int02[Hi[mx],
a, mx] +
mx (int12[Hi[mx], mx] +
Derivative[1][Hi][mx] int22[Hi[mx], mx])) == 0,
Hi[10^-7] == 10^-9}, Hi, {mx, .1, 10^-19}];
This returns an error NDSolveValue::ndnum: Encountered non-numerical value for a derivative at mx == 1.`*^-7.
NOTE: Trh, and \sigmavtotal and nXeq are defined previously, and are of the form: \[Sigma]vtotal[a_, \[Gamma]_, w_, Hi_, mx_, T_Symbol]
nXeq[a_, \[Gamma]_, w_, Hi_, mx_, T_Symbol]
Trh[\[Gamma]_, Hi_]
and the other functions are of the form T[a_, \[Gamma]_, w_, Hi_]
and Trh11[a_, \[Gamma]_, w_, Hi_]
I want to plot for mx: 0.1 to 10^-19