# Problems using a complicated function within a LogLinearPlot [duplicate]

This question is an exact duplicate of:

my problem is that I have a rather large function which I'm trying to plot, which looks something like this:

Plot[NIntegrate[f[x,y],{x,0,pole,xmax},Method->"LocalAdaptive"],{y,ymin,ymax}]


This works fine, but when I try to change it to LogLinearPlot, I get a lot of error messages. Any idea what I should do?

Thanks, Dan

## marked as duplicate by bbgodfrey, Mr.Wizard♦Feb 13 '15 at 13:47

This question was marked as an exact duplicate of an existing question.

• I have trouble guessing what error messages you get :D Joking aside you are trying to numerically integrate a function of two variables over the first one. That's not possible - you have to supply NIntegrate with values for every parameter or you will end up with a lot of error messages. – Sektor Feb 13 '15 at 11:57
• @Sektor The y values comes from Plot, except when it attempts symbolic evaluation. – Mr.Wizard Feb 13 '15 at 12:28

This should probably be closed as a duplicate of one of the the many NumericQ questions on this site.
The problem is that LogLinearPlot attempts a symbolic evaluation, meaning that y is not given a value, and NIntegrate doesn't like this! You can use a wrapper function to prevent non-numeric y values being passed its way:
f[x_, y_] := x + y^2