1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Integration matlab

  1. Oct 15, 2009 #1
    1. The problem statement, all variables and given/known data

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

    using Matlab.

    2. Relevant equations



    3. 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 doesnt give me the integral, it says:
    Warning: Explicit integral could not be found.
    why?
     
  2. jcsd
  3. Oct 15, 2009 #2

    MATLABdude

    User Avatar
    Science Advisor

    You may want to refer to this thread:
    https://www.physicsforums.com/showthread.php?t=229516

    EDIT: Also, are you sure that y (as a variable, and not as a constant defined elsewhere) is supposed to be in your equation? You'll need to solve a differential equation, if that is the case.
     
  4. Oct 15, 2009 #3
    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 dont know how to i tried integration by parts repeatedly but it didnt work
    so im 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?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook