Have a look at our next question.
We have two brackets y equals to 3x squared, plus x minus 1,
multiplied by 10x minus 2. Now, here you have two options.
You can either expand it out because it is easier to expand.
By expanding, I mean, you can just times it through.
Now usually that?s more of a problem when you have some sort of power here,
so maybe you have a number n here or there and that?s when we avoid expanding
but even in this case you can use the product rule and you?ll see that it?s equally easy.
Let?s just get rid of that n and it really is up to you.
You are at this point when you?re learning so many different methods
that you have a choice of what to use but if I just split it into two functions
and I say this is function one, this is function two,
simply because I don?t feel like expanding it, we can still apply the product rule to this.
So, a quick recap of what the product rule is, dy/dx where the product rule is uv dash,
plus vu dash or the other way around so if you?ve learned as vdudx plus udvdx,
it?s exactly the same thing with the product rule because you have a plus in the middle,
it doesn?t matter what order you write them in.
Let?s split this. So we've got u equals to 3x squared plus x minus 1 and v equals to 10x minus 2.
U dash or du/dx, is 6x plus 1, remember any x just goes to 1 or the number next to it
and the constants disappear and then v dash or dv/dx is just 10.
Let?s put it into the formula so you?re literally just cross multiplying
but you?re kind of going across to multiply so we can say that dy/dx now
is if I do vdudx, so we have 10x minus 2, multiplied by 6x plus 1,
you have a plus in the middle, and then it?s 10 multiplied by 3x squared, plus x minus 1,
and it?s not dividing with anything because it?s not the quotient rule.
It?s fairly factorized at this point, so we can see if things cancel out by just timesing it out.
If you multiply this two, you get 60x squared, plus 10x, minus 12x, minus 2 for the first part
and then here if we times it to 2, we get 30x squared, plus 30x minus, plus 10x, I mean not 30,
10x minus 10 and it?s got a few x squared terms that we can combine,
and a few x terms we can combine so I suppose it?s a good decision that we expanded it out.
So if you bring your x squared terms together firstly, you got 60x squared, plus 30x squared,
10x minus 12x that gives you minus 2x and then you also have this, plus 10x
and then we have minus 2, minus 10. 90x squared, plus 8x, minus 12 and that?s our gradient.
So in some sense it?s better that you expand it because you got a much simplified answer
and there are other instances where it?s better that you just leave it factorized
but it?s just a matter of you either forward thinking or just trying out and decide,
and checking whether it?s worth expanding it or just leaving it as it is.