Evaluating Integrals with Matlab for Integration of (sinx)^(y-3)

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 3K views
sara_87
Messages
748
Reaction score
0

Homework Statement



If i want to evaluate the following integral:
[tex]\int(sinx)^{y-3} dx[/tex]

using Matlab.

Homework Equations





The Attempt at a Solution



i first defined the variables x and y:
syms x
syms y
then i typed the integral;
int(sin(x)^(3-y),x)
but it doesn't give me the integral, it says:
Warning: Explicit integral could not be found.
why?
 
Physics news on Phys.org
y is a constant but we are not given the value so the answer should be in terms of y.
i want to integrate:
[tex]\frac{(cosy)^{2b-3}}{(siny)^{b-1}}[/tex]
but i don't know how to i tried integration by parts repeatedly but it didnt work
so I am trying to use Matlab.
I did:
syms x
syms y
syms b
int((cos(y))^(2b-3)/((sin(y))^(b-1)),x)
but it didnt work.
do you have any ideas how to find this integral analytically or using Matlab?