%% Exponential and Trigonometric Functions
% Apply integration by parts to the integral \int e^{\textrm{ax}} \;\sin \left(\textrm{bx}\right)\;\textrm{dx}.
% Define the integral using the int function. Show the integral without evaluating it by setting the 'Hold' option to true.

syms x a b
F = int(exp(a*x)*sin(b*x),'Hold',true)

% To show the steps of integration, apply integration by parts to F and use u^{\prime } \left(x\right)=e^{\textrm{ax}} as the differential to be integrated.

G = integrateByParts(F,exp(a*x))

% Evaluate the integral in G by using the release function to ignore the 'Hold' option.

F1 = release(G)

% Simplify the result.

F2 = simplify(F1)

%
% Copyright 2019 The MathWorks, Inc.