Write a C++ function to evaluate this mathematical function: f(x) = 0.1x^2-x In x. Assume that the corresponding function prototype is double f (double x);
Expert Answer
Raw Paste Function Code:
The required function
//function definition
double f(double x)
{
//evaluate the function for x
double fx=((0.1*pow(x,2))-(x*log(x)));
//return the evaluated result
return fx;
}