# Tutor profile: Astou N.

## Questions

### Subject: Calculus

Find the derivative of $$f(x) = (x^3 - 3x^2 + 1)sin(x)$$ using the chain rule.

The chain rule states that the derivative of a multiplication of two polynomials is the addition of the first equation and the second's derivative plus the second equation and the first's derivative. -If $$f(x) = g(x) + h(x)$$, then $$f'(x) = g'(x)h(x) + g(x)h'(x)$$. In this example, we can say $$g(x) = x^3 - 3x^2 + 1$$ and $$h(x) = sin(x)$$. The derivative of the two, respectively, would be $$g'(x) = 3x^2 - 6x$$ and $$h'(x) = cos(x)$$. Using the chain rule, we can calculate $$f'(x) = (3x^2 - 6x)sin(x) + (x^3 - 3x^2 + 1)cos(x)$$ and with no way to reduce it further, this is the solution.

### Subject: C++ Programming

Write the Fibonacci sequence as both a recursive (named "recur_fib") and non-recursive (named "non_recur_fib") function. Both functions should pass an integer parameter named n, which represents the nth value in the sequence.

//Recursive Fibonacci int recur_fib(int n) { if( n < 2) { return n; } return recur_fib(n-1) + recur_fib(n-2); } //Non-recursive Fibonacci int non_recur_fib(int n) { int num1 = 0; //first value in sequence int num2 = 1; //second value in sequence int increment = 2; for(int i = 2; i < n; i++) { int num3 = num2; num2 += num1; //add last 2 numbers together num1 = num3; //new 1st value } if (n <= 0) { return n; } return num1 + num2; }

### Subject: Algebra

If $$ y = 2x + 3 $$ and equation $$ y = -4x - 7 $$, find the $$x$$ where the equations are equal.

Because we are trying to determine where y1 = y2 are equal, we first assign the two equations to each other. -y1 = y2, so $$2x + 3 = -4x - 7$$ Next, we isolate the variables, by subtracting the constants on both sides. $$2x + 3 (-3) = -4x - 7 (-3)$$ $$2x = -4x - 10$$ We perform the same action with $$-4x$$. $$2x (+4x) = -4x - 10 (+4x)$$ $$6x = -10$$ With the constants and variables separate, we perform division so that x is a multiple of 1. $$6x/6 = -10/6$$ $$x = -10/6$$ We can conclude that $$2x + 3 = -4x - 7$$ is true when $$x = -10/6$$.

## Contact tutor

needs and Astou will reply soon.