# Integration

This set of MATLAB Interview Questions and Answers for Experienced people focuses on “Integration”.

1. How will we integrate a non-linear function, f, taken as an inline function?
a) int([f])

2. The correct way of using the quad command while integrating an inline non-linear function is ___________

3. What is the class of the result of quad() command?
a) Long
b) Short
c) Double
d) Unsigned

4. What is the output of the following code?

`s=23;p=90;z=p-s;int(x^-exp(-Inf),p,z)`

a) -23
b) 67
c) 0
d) Error

5. The int function returns a constant of integration for indefinite integration.
a) True
b) False

6. The answer for indefinite integration in MATLAB is __________
a) The only possible particular integral
b) One of the many possible integrals
c) 0
d) erroneous

7. What is the output of the following code?

`int(int(x^2))`

a) x^4/12
b) x^4/16
c) 0
d) Error

8. We cannot perform problems regarding area under a curve in MATLAB.
a) True
b) False

9. What is the class of the result of quadl() command?
a) double
b) short
c) long
d) symbolic

10. To find the particular integral of a differential equation, we use the _____
a) int() command
c) ODE solver
d) Depends on the differential equation

11. The int() function gives the __________
a) general solution of the ODE
b) general solution of the function
c) particular integral of a function
d) complementary function

12. What will be the command to find the current through a 1H inductor (no initial current) whose voltage changes by v=t2?
a) int(‘t2’)
b) intg(‘t2’)
c) int(t2)
d) Cannot be determined

13. The command quad() cannot do ______ integrals.
a) Definite
b) Indefinite
c) Particular
d) Any

14. The code quad(‘x.^2’,-3,2) is same as ___________

15. The capacitor voltage due to a current of i=t4with v(0+)=3 is found from using _________
a) ODE solver
b) int() command
d) diff() command

16. The accuracy of quad() is ___________
a) very low
b) low
c) moderate
d) high

17. Double integration of a function can be done by using the _____ command.
a) int(int(func))
b) int(‘int(‘func’)’)
d) cannot be done

18. How will ∫exx look like, in MATLAB?
a) Infinite series
b) expint(x)
c) ei(x)
d) Error

19. The class of the result of an indefinite integration is always _____________
a) Signed
b) Double
c) Array
d) Symbolic

20. The quad command cannot do ______________
a) Low accuracy integration
b) Definite integration
c) Any integration
d) Indefinite integration

21. The function, as an input to the quad command, is given as _______________
a) Symbolic argument
b) String argument
c) Double argument
d) Rational argument

22. The output of int(x^2,1,3) and quad(‘x. ^2,1,3) is ________
a) Same
b) Different
c) Maybe different
d) Error

23. The command to get more accurate solution for definite integration is ______________
a) int()