hey, i want to make a function for integration of expressions not for the trigonometric function(such as sin,cos etc). just for expressions like x^2+x^3,
and having limits of integration,so that user can enter an expression and the program can find its integration.
i can do it for just x but cant write a code for a whole program, so how would i do that . any hint.
Thanks.
if you only want to integrate expressions formed like c1*xn1 + c2*xn2 + ..., it is not difficult. Write a struct Member{ float c, n; }; to hold one member of the line. Then write a function to convert a string into Member. This will basically be cin >> c; cin.ignore(2); cin >> n;. Then n++; c /= n;. And lastly, print each member.