How do I integrate a Fractional Trigonometric function in Matlab?

Hi
I want to integrate
ki = k /((2*pi)^(alpha-1)*int(0-2*pi) cos(theta)^alpha*2^(beta-alpha)).
where k=1, alpha =1.35, beta = 2.09.
I have tried the following in matlab:
1.
fun1 = @(theta) (cos(theta)).^alpha*(2).^(beta-alpha);
q1 = integral(fun1,0,2*pi);
d1 = (2*pi)^(alpha-1);
ki = k/(d1*q1);
2.
int(((cos(x))^alpha*2^(beta-alpha),0, 2*pi)
But I am getting incorrect answers, i.e. they do not match with my hand calculations. Am I using the incorrect format in matlab. Or is anyone of this method correct and I might be going wrong with my hand calculations?
Is there something different to use for fractional trignometric integration matlab?
Any help would be appreciated.
Thanks
Sneha

댓글 수: 5

I don't see the abs() in your function definitions.
Thanks Torsten for pointing out my mistake.
But I am still not getting the correct answer, assuming my hand calculations are true.
Am I correct when integrating cos(theta) from 0-2*pi,
solution is
= [abs(sin(theta))]^alpha, 0-2*pi
= [abs(sin(2*pi)-sin(0))]^alpha
=0
matlab: sin(2*pi)-sin(0)
ans =
-2.4493e-16
>> abs(ans)
ans =
2.4493e-16
>> ans^1.35
ans =
8.4179e-22
Thanks
Sneha
Your hand-calculations are wrong:
integral((cos(x))^alpha)
is not equal to
(sin(x))^Alpha
Hint:
d/dx ((sin(x))^alpha) = alpha*(sin(x))^(alpha-1)*cos(x)
Thank You Torsten.
It has solved my problem to an extent.
Thanks
Sneha
I want to integrate the function attached in the picture please

댓글을 달려면 로그인하십시오.

답변 (0개)

질문:

2018년 10월 29일

편집:

2020년 10월 21일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by