I'd like to numerically solve an integral of the form of 1/x, by using the symbolic toolbox. The answer be ln|x| + c. When I however use the symbolic toolbox to integrate the function:
syms xintegral = int(@(x) 1/x, x)integral = log(x)
which is clearly not the answer, as it misses the absolute signs. Am I missing something or is it otherwise possible to include the absolute signs?
I'll appreciate for any help. Thanks!
Best Answer