How to get results from symbolic variable integration
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hosup Song
am 27 Jul. 2016
Kommentiert: Walter Roberson
am 28 Jul. 2016
Pretty straight forward, I'm trying to do integration with symbolic variables.
I'm doing some complex integration with a mix of high degree polynomials and trig functions.
This is what I tried so far:
syms x
b4 = (x^127+x^32-x^12+78*x^2-5*cos(x))
int(b4, 0, 1)
I was hoping to get some number for the answer, but instead, I got this:
ans =
int((x^127+x^32-x^12+78*x^2-5*cos(x)), x, 0, 1)
I don't know why this is happening. How do I get the actual answer in numbers?
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 27 Jul. 2016
There is no readily-found closed-form solution for your actual integral. You will need to use vpa() or double() to request numeric integration.
2 Kommentare
Weitere Antworten (1)
Andrei Bobrov
am 27 Jul. 2016
in R2016a
>> syms x
b4 = (x^127+x^32-x^12+78*x^2-5*cos(x));
int(b4, 0, 1)
ans =
1425581/54912 - 5*sin(1)
>>
1 Kommentar
Siehe auch
Kategorien
Mehr zu Assumptions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!