# Tutor profile: Jose G.

## Questions

### Subject: Calculus

Differentiate $$y=11x^3+sin(5x)*cos(5x)$$

If you are new to differentiation (finding derivatives), it can be a little scary to see trigonometric functions in a problem, especially those that have something other than $$x$$ in the parentheses. Fear not - we will walk through each step together. There are a few properties regarding differentiation itself that make our lives a little easier. The three we will be using today are: 1) Functions that are added or subtracted from each other can be differentiated independently 2) Functions that are multiplied with each other should be differentiated using the Product Rule 3) The Chain Rule always applies Ok - first, let's figure out how many functions (of $$x$$) we have in our problem and identify them: $$f_1=11x^3$$ $$f_2=sin(5x)$$ $$f_3=cos(5x)$$ So we have three functions. $$f_1$$ is added to the product of $$f_2$$ and $$f_3$$. Since $$f_1$$ is just added, we can find its derivative independently: $$f_1'=3*11x^2=33x^2$$ (drop the 3 and subtract one from the exponent) Our other two functions are multiplied together, so we have to use the Product Rule to find the derivative of their product. The Product Rule can be written as follows: $$(g*h)'=g'*h+g*h'$$ That is, the derivative of the product of two functions is equal to the derivate of the first function times the second plus the derivative of the second function times the first. Easy as pie. Let's apply this rule to our two functions $$f_2$$ and $$f_3$$. To do that, we'll need to find $$f_2'$$ and $$f_3'$$. Let's go: $$f_2'=[sin(5x)]'$$ $$f_2'=cos(5x)*[5x]'$$ $$f_2'=cos(5x)*5=5cos(5x)$$ The derivative of $$sin(x)$$ is $$cos(x)$$, but why did we multiply by $$[5x]'$$ (i.e., 5)? Because the Chain Rule always applies! In other words, we have to multiply by the derivative of the stuff INSIDE the parentheses. The stuff inside the parentheses is just $$5x$$, and its derivative is just 5. Now that we know how to find $$f_2'$$, we can determine $$f_3'=-sin(5x)*5=-5sin(5x)$$. (I'll skip the steps this time; if you want to try it, use the fact that the derivative of $$cos(x)$$ is $$-sin(x)$$). Ok - we now have all the tools we need to figure out the final answer. Let's write it out: $$y=f_1+f_2*f_3$$ $$y'=f_1'+[f_2'*f_3+f_2*f_3']$$ (Product Rule, remember?) $$y'=33x^2+[(5cos(5x))*cos(5x)+(-5sin(5x))*sin(5x)]$$ (plug in our functions and their derivatives) $$y'=33x^2+5[cos^2(5x)-sin^2(5x)]$$ (factor out the 5 and merge like terms) Voila! There's your answer. *BONUS ROUND: If you're feeling extra math-y today, you can simplify further by using one of the identities from trigonometry: $$cos(2\theta)=cos^2(\theta)+sin^2(\theta)$$ where $$\theta=5x$$ in this case. So, the final (simplified) answer is: $$y'=33x^2+5cos(10x)$$

### Subject: C Programming

Write a C program that asks a user for three numbers and displays their average on the screen.

#include<stdio.h> /* We include stdio.h because it contains functions that allow us to query the user and display stuff to the screen */ /* All C programs start here... at int main() */ int main() { /* Let's create some variables to hold our data. We are choosing floats (instead of ints) because the user may want to input a decimal number, and our answer may also be a decimal number */ float num1, num2, num3, answer; /* It's good practice to initialize variables (i.e., set them to something) - you can sometimes get unexpected behavior if you don't! */ num1 = 0.0; num2 = 0.0; num3 = 0.0; answer = 0.0; /* Let's prompt the user for some numbers and store them in the variables we created */ printf("Input the first number: "); scanf("%f", &num1); printf("Input the second number: "); scanf("%f",&num2); printf("Input the third number: "); scanf("%f",&num3); /* Now, let's calculate the average and store it in our answer variable */ answer = (num1 + num2 + num3)/3.0; /* Finally, display the result on the screen - printf will take whatever value is in 'answer' and will replace it in the spot held by '%f'*/ printf("The average is %f\n", answer); return 0; }

### Subject: Physics

You and your friend have decided to achieve online stardom by creating viral videos of your mad athletic skills. For today's video, you decide to kick a soccer ball across an 18 m-wide lake into a small basket on the edge of the lake. Over the last few videos, you've determined that you can reliably kick a ball at 14 m/s. If you place the ball on your side of the lake, at what angle (from the ground) should you kick the ball to land it in the basket?

It always helps to restate the question as simply as possible, getting rid of all the "fluff". Here, we are launching (kicking) a ball at 14 meters per second at some angle (TBD!) and landing it in a basket 18 meters away. Our job is to find what the launch angle should be. To get a good "feel" for the problem, let's think about how the angle affects the trajectory of the ball. If the angle is too large, the ball will launch very high but not very far forward, landing short of the target (in the lake). If the angle is too small, the ball will launch really far forward but not very high, and we'll probably overshoot our target. So how do we find the angle? We'll use a little bit of trigonometry and our kinematic equations. Ok - first, let's assign some of the things we know to variables... this will make it easier/less messy to work with them. The speed of the ball (let's call it $$v_{ball}$$) is 14 m/s. The horizontal distance the ball has to travel ($$d_x$$) is 18 m. The launch angle of the ball ($$\theta_{ball}$$) is what we're trying to find. Now, to develop some relationships between these variables, let's look at the moment immediately after the ball is kicked. The velocity with magnitude $$v_{ball}$$ at angle $$\theta_{ball}$$ can be split into two components: horizontal ($$v_{\hat{x}}$$) and vertical ($$v_{\hat{y}}$$). We can use a little bit of trigonometry to figure this out (I'll assume you know how to do this, but if you don't we can discuss in depth... it just involves drawing a few triangles!). Ok, so right after the ball is kicked, it is traveling at the following velocities: $$v_{\hat{x}}=v_{ball}*cos(\theta_{ball})$$ (horizontal) $$v_{\hat{y}}=v_{ball}*sin(\theta_{ball})$$ (vertical) Now, we can think about what happens to the ball as it travels through the air. Are there any forces acting on the ball? ... yes! Otherwise, the ball would continue flying in the air forever, or at least until it ran into something in space. Normally, we'd draw a force diagram to show all the forces acting on our object. In this case, the only force acting on the ball is gravity, with an acceleration of -9.8 m/s$$^2$$. **NOTE: gravity only acts on the object in the vertical direction (straight up and down), so it will only affect our vertical velocity! This is super important; it means there is NO acceleration/deceleration in the horizontal direction. Because we know there is no acceleration in the horizontal direction, we can write a simple relationship between horizontal distance and speed: $$d_x=v_{\hat{x}}*t$$ where $$t$$ is the amount of time was in the air. We don't currently know $$t$$, but we know $$d_x$$ and have an equation for $$v_{\hat{x}}$$. Plugging in: $$d_x=v_{ball}*cos(\theta_{ball})*t$$ $$18=14*cos(\theta_{ball})*t$$ Ideally, we can write out another equation with both $$\theta_{ball})$$ and $$t$$ and solve for both unknowns (two equations, two unknowns = happy solving), giving us the answer we're trying to find. We can use a little bit of intuition to help us out here... when we launch the ball in the air, it's going to travel in an arch. Right after the ball launches, it will have a positive vertical velocity. At the very top of that arch, and exactly halfway through its trajectory, the ball will have zero vertical velocity. Immediately afterward, the ball will begin to have a negative velocity. What will the vertical velocity be *right before* the ball hits the ground? ... its launch velocity, but in the opposite direction (negative)! With this insight, we can use one of our kinematic equations: $$v_f=v_i+a*t$$. Our initial velocity is $$v_{\hat{y}}$$, our final velocity is $$-v_{\hat{y}}$$, and our acceleration is simply gravity (-9.8 m/s$$^2$$). Let's plug everything in: $$-v_{\hat{y}}=v_{\hat{y}}+(-9.8)*t$$ $$-v_{ball}*sin(\theta_{ball})=v_{ball}*sin(\theta_{ball})-9.8*t$$ $$-14*sin(\theta_{ball})=14*sin(\theta_{ball})-9.8*t$$ $$-28*sin(\theta_{ball})=-9.8*t$$ There we go! Two equations and two unknowns. We'll do some algebra to find $$t$$ and $$\theta_{ball}$$ (I'll assume you know how to do this.. again, if you need help, I can walk you through the steps!). After a little shake n' bake, we figure out our launch angle ($$\theta_{ball}$$) should be 32.1 degrees.

## Contact tutor

needs and Jose will reply soon.