Mister Exam

Derivative of tg((2x-4)/x)

Function f() - derivative -N order at the point
v

The graph:

from to

Piecewise:

The solution

You have entered [src]
   /2*x - 4\
tan|-------|
   \   x   /
tan(2x4x)\tan{\left(\frac{2 x - 4}{x} \right)}
tan((2*x - 4)/x)
Detail solution
  1. Rewrite the function to be differentiated:

    tan(2x4x)=sin(2x4x)cos(2x4x)\tan{\left(\frac{2 x - 4}{x} \right)} = \frac{\sin{\left(\frac{2 x - 4}{x} \right)}}{\cos{\left(\frac{2 x - 4}{x} \right)}}

  2. Apply the quotient rule, which is:

    ddxf(x)g(x)=f(x)ddxg(x)+g(x)ddxf(x)g2(x)\frac{d}{d x} \frac{f{\left(x \right)}}{g{\left(x \right)}} = \frac{- f{\left(x \right)} \frac{d}{d x} g{\left(x \right)} + g{\left(x \right)} \frac{d}{d x} f{\left(x \right)}}{g^{2}{\left(x \right)}}

    f(x)=sin(2x4x)f{\left(x \right)} = \sin{\left(\frac{2 x - 4}{x} \right)} and g(x)=cos(2x4x)g{\left(x \right)} = \cos{\left(\frac{2 x - 4}{x} \right)}.

    To find ddxf(x)\frac{d}{d x} f{\left(x \right)}:

    1. Let u=2x4xu = \frac{2 x - 4}{x}.

    2. The derivative of sine is cosine:

      ddusin(u)=cos(u)\frac{d}{d u} \sin{\left(u \right)} = \cos{\left(u \right)}

    3. Then, apply the chain rule. Multiply by ddx2x4x\frac{d}{d x} \frac{2 x - 4}{x}:

      1. Apply the quotient rule, which is:

        ddxf(x)g(x)=f(x)ddxg(x)+g(x)ddxf(x)g2(x)\frac{d}{d x} \frac{f{\left(x \right)}}{g{\left(x \right)}} = \frac{- f{\left(x \right)} \frac{d}{d x} g{\left(x \right)} + g{\left(x \right)} \frac{d}{d x} f{\left(x \right)}}{g^{2}{\left(x \right)}}

        f(x)=2x4f{\left(x \right)} = 2 x - 4 and g(x)=xg{\left(x \right)} = x.

        To find ddxf(x)\frac{d}{d x} f{\left(x \right)}:

        1. Differentiate 2x42 x - 4 term by term:

          1. The derivative of the constant 4-4 is zero.

          2. The derivative of a constant times a function is the constant times the derivative of the function.

            1. Apply the power rule: xx goes to 11

            So, the result is: 22

          The result is: 22

        To find ddxg(x)\frac{d}{d x} g{\left(x \right)}:

        1. Apply the power rule: xx goes to 11

        Now plug in to the quotient rule:

        4x2\frac{4}{x^{2}}

      The result of the chain rule is:

      4cos(2x4x)x2\frac{4 \cos{\left(\frac{2 x - 4}{x} \right)}}{x^{2}}

    To find ddxg(x)\frac{d}{d x} g{\left(x \right)}:

    1. Let u=2x4xu = \frac{2 x - 4}{x}.

    2. The derivative of cosine is negative sine:

      dducos(u)=sin(u)\frac{d}{d u} \cos{\left(u \right)} = - \sin{\left(u \right)}

    3. Then, apply the chain rule. Multiply by ddx2x4x\frac{d}{d x} \frac{2 x - 4}{x}:

      1. Apply the quotient rule, which is:

        ddxf(x)g(x)=f(x)ddxg(x)+g(x)ddxf(x)g2(x)\frac{d}{d x} \frac{f{\left(x \right)}}{g{\left(x \right)}} = \frac{- f{\left(x \right)} \frac{d}{d x} g{\left(x \right)} + g{\left(x \right)} \frac{d}{d x} f{\left(x \right)}}{g^{2}{\left(x \right)}}

        f(x)=2x4f{\left(x \right)} = 2 x - 4 and g(x)=xg{\left(x \right)} = x.

        To find ddxf(x)\frac{d}{d x} f{\left(x \right)}:

        1. Differentiate 2x42 x - 4 term by term:

          1. The derivative of the constant 4-4 is zero.

          2. The derivative of a constant times a function is the constant times the derivative of the function.

            1. Apply the power rule: xx goes to 11

            So, the result is: 22

          The result is: 22

        To find ddxg(x)\frac{d}{d x} g{\left(x \right)}:

        1. Apply the power rule: xx goes to 11

        Now plug in to the quotient rule:

        4x2\frac{4}{x^{2}}

      The result of the chain rule is:

      4sin(2x4x)x2- \frac{4 \sin{\left(\frac{2 x - 4}{x} \right)}}{x^{2}}

    Now plug in to the quotient rule:

    4sin2(2x4x)x2+4cos2(2x4x)x2cos2(2x4x)\frac{\frac{4 \sin^{2}{\left(\frac{2 x - 4}{x} \right)}}{x^{2}} + \frac{4 \cos^{2}{\left(\frac{2 x - 4}{x} \right)}}{x^{2}}}{\cos^{2}{\left(\frac{2 x - 4}{x} \right)}}

  3. Now simplify:

    4x2cos2(24x)\frac{4}{x^{2} \cos^{2}{\left(2 - \frac{4}{x} \right)}}


The answer is:

4x2cos2(24x)\frac{4}{x^{2} \cos^{2}{\left(2 - \frac{4}{x} \right)}}

The graph
02468-8-6-4-2-1010-50005000
The first derivative [src]
/       2/2*x - 4\\ /2   2*x - 4\
|1 + tan |-------||*|- - -------|
\        \   x   // |x       2  |
                    \       x   /
(2x2x4x2)(tan2(2x4x)+1)\left(\frac{2}{x} - \frac{2 x - 4}{x^{2}}\right) \left(\tan^{2}{\left(\frac{2 x - 4}{x} \right)} + 1\right)
The second derivative [src]
  /       2/2*(-2 + x)\\ /    -2 + x\ /       /    -2 + x\    /2*(-2 + x)\\
4*|1 + tan |----------||*|1 - ------|*|-1 + 2*|1 - ------|*tan|----------||
  \        \    x     // \      x   / \       \      x   /    \    x     //
---------------------------------------------------------------------------
                                      2                                    
                                     x                                     
4(1x2x)(2(1x2x)tan(2(x2)x)1)(tan2(2(x2)x)+1)x2\frac{4 \left(1 - \frac{x - 2}{x}\right) \left(2 \left(1 - \frac{x - 2}{x}\right) \tan{\left(\frac{2 \left(x - 2\right)}{x} \right)} - 1\right) \left(\tan^{2}{\left(\frac{2 \left(x - 2\right)}{x} \right)} + 1\right)}{x^{2}}
The third derivative [src]
                                      /                                                    2                                        2                 \
  /       2/2*(-2 + x)\\ /    -2 + x\ |       /    -2 + x\    /2*(-2 + x)\     /    -2 + x\  /       2/2*(-2 + x)\\     /    -2 + x\     2/2*(-2 + x)\|
4*|1 + tan |----------||*|1 - ------|*|3 - 12*|1 - ------|*tan|----------| + 4*|1 - ------| *|1 + tan |----------|| + 8*|1 - ------| *tan |----------||
  \        \    x     // \      x   / \       \      x   /    \    x     /     \      x   /  \        \    x     //     \      x   /      \    x     //
-------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                            3                                                                          
                                                                           x                                                                           
4(1x2x)(tan2(2(x2)x)+1)(4(1x2x)2(tan2(2(x2)x)+1)+8(1x2x)2tan2(2(x2)x)12(1x2x)tan(2(x2)x)+3)x3\frac{4 \left(1 - \frac{x - 2}{x}\right) \left(\tan^{2}{\left(\frac{2 \left(x - 2\right)}{x} \right)} + 1\right) \left(4 \left(1 - \frac{x - 2}{x}\right)^{2} \left(\tan^{2}{\left(\frac{2 \left(x - 2\right)}{x} \right)} + 1\right) + 8 \left(1 - \frac{x - 2}{x}\right)^{2} \tan^{2}{\left(\frac{2 \left(x - 2\right)}{x} \right)} - 12 \left(1 - \frac{x - 2}{x}\right) \tan{\left(\frac{2 \left(x - 2\right)}{x} \right)} + 3\right)}{x^{3}}