This set of MATLAB Multiple Choice Questions & Answers (MCQs) focuses on “Differentiation – 1”.

1. Which rule does MATLAB use while differentiating a set of functions?

a) u-v rule

b) by parts

c) no pre-defined rule

d) not possible

View Answer

Explanation: If we give an argument within our command diff() which is a product of multiple functions or division of two functions; we will get the result that will be generated according to the u-v rule. This makes MATLAB very versatile for the applications concerning differentiation.

2. There is no difference between a difference equation and a differential equation.

a) True

b) False

View Answer

Explanation: There are many differences between a difference equation and a differential equation. But the most important would be that a difference equation takes finite steps of changes of our changing variable while a differential equation takes an infinitesimal change in our changing variable.

3. For the existence of the n^{th} (n is varying from 1 to until the derivative is becoming 0) derivative of an equation, the equation should have __________

a) Initial values

b) At least one independent variable

c) At least one dependent variable

d) No such condition

View Answer

Explanation: Derivatives are calculated with respect to a change in an independent variable. Hence for deriving a derivative- the equation should have at least one independent variable so that we can find the derivative with respect to a change in that independent variable.

4. What will be the output of the following code?

syms x;diff(sin(x)\x^{2})

a) (2*x)/sin(x) – (x^{2}*cos(x))/sin(x)^{2}

b) cos(x)/x^{2} – (2*sin(x))/x^{3}

c) x^{2}*cos(x) + 2*x*sin(x)

d) Error

View Answer

Explanation: We observe that sin(x)\x

^{2}has a back slash. This, in MATLAB, implies that x

^{2}is divided by sin(x). Hence the answer is (2*x)/sin(x) – (x

^{2}*cos(x))/sin(x)

^{2}. If it would have been a front slash, the answer would have been cos(x)/x

^{2}– (2*sin(x))/x

^{3}. If there was a ‘*’ sign, the answer would have been ‘x

^{2}*cos(x) + 2*x*sin(x)’.

5. What is the data type of y?

y=diff(x^{2}*cos(x) + 2*x*sin(x))

a) Symbolic

b) Double

c) Array

d) Symbolic Array

View Answer

Explanation: Every element saved in the workspace is stored as an array. The class of the array will be symbolic for y since we haven’t specified a value for x. If we give a value of x, y will be stored as Double.

6. The output for diff(p^{2},q) is _______

a) 0

b) 2*p

c) 2 dp/dq

d) Error

View Answer

Explanation: We are differentiating the function ‘p

^{2}’ with respect to q. Hence the value will be 0. The 2

^{nd}argument in the diff() command is the variable, with respect to which- we differentiate our function.

Output: 2*p

7. What does the following code do?

syms m,y,x,c; y=mx+c; diff(y)

a) Calculate m

b) Calculate slope

c) Error

d) Calculate divergence

View Answer

Explanation: While using syms, we can’t instantiate multiple symbolic variables using a comma. We will have to enter them with space in between. Hence MATLAB returns an error. If we remove the comma, the code will calculate the slope of ‘y=mx+c’.

8. What is the nature of ode45 solver?

a) 2^{nd} ordered R-K solver

b) 4^{th} ordered R-K solver

c) 1^{st} order R-K solver

d) Adams solver

View Answer

Explanation: The ode45 solver is an Ordinary Differential Equation solver in MATLAB which is used to solve a differential equation using the Runga-Kutta or R-K method upto 4

^{th}order. This is an inbuilt ODE solver in MATLAB.

9. Ordinary differential equations having initial values ____________

a) Can be solved

b) Cannot be solved

c) Can be modelled

d) Has a trivial solution

View Answer

Explanation: We have 8 different Ordinary differential equations solvers in MATLAB. They take the initial values, if at all present, into account while solving the Differential equation of interest. Hence, systems which follow a differential equation can be modelled and observed using MATLAB.

10. The current characteristics of RC networks are better analyzed by Laplace than differentiation methods.

a) True

b) False

View Answer

Explanation: We use the Laplace method to ease the process of solving a differential equation. But, with the help of MATLAB- we can solve them very fast. So, it is obvious to use the ODE solver to calculate the current through the capacitor in RC networks and get a time response.

**Sanfoundry Global Education & Learning Series – MATLAB.**

To practice all areas of MATLAB, __here is complete set of 1000+ Multiple Choice Questions and Answers__.

**If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]**

**Related Posts:**