Question

4. Write a MatLab program that calculates the following indefinite integrals. The program should use pretty() to display both

Comments
    0 0
    Add a comment Improve this question Transcribed image text
    Answer #1

    MATLAB code to find the integration of three functions:

    clc
    clear all
    syms x a b c
    fprintf('Integrate \n')
    f1=(sin(3*x))/(cos(x))^5;
    pretty(f1)
    fprintf('Result1 = \n')
    Result1=int(f1);
    pretty(Result1)
    fprintf('Result1 after simlification using simplify() command \n')
    pretty(simplify(Result1));
    fprintf('Integrate \n')
    f2=x/((a+c*x^2)^(5/2));
    pretty(f2)
    fprintf('Result2 = \n')
    Result2=int(f2);
    pretty(Result2)
    fprintf('Result2 after simlification using simplify() command \n')
    pretty(simplify(Result2))
    fprintf('Integrate \n')
    f3=sin(x)/(a*cos(x)+b*sin(x))^2;
    pretty(f3)
    fprintf('Result3 = \n')
    Result3=int(f2);
    pretty(Result3)
    fprintf('Result3 after simlification using simplify() command \n')
    pretty(simplify(Result3))

    MATLAB OUTPUT:


    Integrate
    sin(3 x)
    --------
    5
    cos(x)

    Result1 =
    2
    8 cos(x) - 1
    -------------
    4
    4 cos(x)

    Result1 after simlification using simplify() command
    2
    8 cos(x) - 1
    -------------
    4
    4 cos(x)

    Integrate
    x
    -------------
    2 5/2
    (c x + a)

    Result2 =
    1
    - -----------------
    2 3/2
    3 c (c x + a)

    Result2 after simlification using simplify() command
    1
    - -----------------
    2 3/2
    3 c (c x + a)

    Integrate
    sin(x)
    ----------------------
    2
    (a cos(x) + b sin(x))

    Result3 =
    1
    - -----------------
    2 3/2
    3 c (c x + a)

    Result3 after simlification using simplify() command
    1
    - -----------------
    2 3/2
    3 c (c x + a)

    None of results simplify using simplify() command.

    Add a comment
    Know the answer?
    Add Answer to:
    4. Write a MatLab program that calculates the following indefinite integrals. The program should ...
    Your Answer:

    Post as a guest

    Your Name:

    What's your source?

    Earn Coins

    Coins can be redeemed for fabulous gifts.

    Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
    Similar Homework Help Questions
    ADVERTISEMENT
    Free Homework Help App
    Download From Google Play
    Scan Your Homework
    to Get Instant Free Answers
    Need Online Homework Help?
    Ask a Question
    Get Answers For Free
    Most questions answered within 3 hours.
    ADVERTISEMENT
    ADVERTISEMENT
    ADVERTISEMENT