Symbolic math integrals not solving at all
48 views (last 30 days)
Show older comments
Florian Rössing on 30 Apr 2021
Commented: Paul on 27 Apr 2022
Hi all, I am playing around with functions and the symbolic math toolbox.
I want to calculate an integral of a difficult function:
syms t t0 tau x;
It can not integrate p directly, which is not that difficult, wolfram alpha does is. But anyhow, I'll help a little and do the substitution:
But it still just comes up with nothing. It just puts out a formated version of my input instead of calculating the integral.
The answer should be
Did I use the toolbox wrong or is it just not that powerfull?
Walter Roberson on 29 Jul 2021
When I take the expression over to Maple and convert the exp() into sinh cosh, then Maple is able to integrate the system. However, I do not seem to be able to do the same thing for MATLAB.
Tanmay Das on 29 Jul 2021
Your function has no obvious closed form integral. You need to switch to numeric integration, such as with integral() or vpaintegral() which will require you to have a numeric value for x. Similar question has already been answered here:
My int function is returning the function back instead of an integral - MATLAB Answers - MATLAB Central (mathworks.com)
Also, the same is mentioned in the Tips Section of the int documentation:
You can go through the documentations on integral and vpaintegral to try integrate the same function:
Paul on 27 Apr 2022
Nope. Also doesn't work anymore in 2021B.
However, that code yields the closed form solution in 2020B.
In 2021B I had to change the expression for the integrand
to get the same integrand as in in 2020B, at least by visual comparison. But even though the integrands were the same, 2021B int() still did not yield the closed form solution.
More Answers (0)
Find more on Formula Manipulation and Simplification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!