What is the #n^(th)# derivative of # y(x) = e^x sinx #?

2 Answers
Aug 21, 2017

#d^n/(dx^n)[e^x sinx] = 2^(n//2)e^(x)sin(x + (npi)/4)#

#n in NN# (#n = 0, 1, 2, . . . #)


Consider that we can rewrite #sinx# using Euler's formula:

#e^(pmix) = cosx pm isinx#

#=> sinx = [cosx + isinx - (cosx - isinx)]/(2i)#

#= (e^(ix) - e^(-ix))/(2i)#

This actually makes it easier to take the #n#th derivative (without the product rule). Now we can rewrite #f(x)# as:

#f(x) = 1/(2i)e^x(e^(ix) - e^(-ix))#

#= 1/(2i)(e^(x + ix) - e^(x - ix))#

#= 1/(2i)(e^((1 + i)x) - e^((1 - i)x))#

Now, consider the #bbn#th derivative of this form, which is actually quite easy since #d^n/(dx^n)[e^(kx)] = k^n e^(kx)# if #k# is your constant.

#=> 1/(2i)(d^n)/(dx^n)[e^((1 + i)x) - e^((1 - i)x)]#

#= 1/(2i)[(1 + i)^n e^((1 + i)x) - (1 - i)^n e^((1 - i)x)]#

Then, notice how #sqrt2 cdot cos(pi/4) = 1# and #sqrt2 cdot sin(pi/4) = 1#. We can then write:

#1 pm i = sqrt2[cos(pi/4) pm isin(pi/4)]#

Thus:

#(1 pm i)^n = 2^(n//2)[cos(pi/4) pm isin(pi/4)]^n#

#= 2^(n//2)e^(pmi npi//4)#

Therefore, we currently have:

#=> 1/(2i)[2^(n//2)e^(i npi//4) e^((1 + i)x) - 2^(n//2)e^(-i npi//4) e^((1 - i)x)]#

#= (2^(n//2))/(2i)[e^(i npi//4) e^xe^(ix) - e^(-i npi//4) e^xe^(-ix)]#

Now, factor out #e^x#:

#= (2^(n//2)e^x)/(2i)[e^(i npi//4) e^(ix) - e^(-i npi//4) e^(-ix)]#

Then, switch the imaginary terms back to trigonometric form using Euler's formula again, because we started in a form with all real numbers:

#= (2^(n//2)e^(x))/(2i)[(cos((npi)/4) + isin((npi)/4)) (cosx + isinx) - (cos((npi)/4) - isin((npi)/4)) (cosx - isinx)]#

Expand:

#= (2^(n//2)e^(x))/(2i)[cos((npi)/4)cos(x) + icos((npi)/4)sinx + isin((npi)/4)cosx - sin((npi)/4)sinx - (cos((npi)/4)cosx - icos((npi)/4)sinx - isin((npi)/4)cosx - sin((npi)/4)sinx)]#

Cancel out some terms:

#= (2^(n//2)e^(x))/(2i)[cancel(cos((npi)/4)cosx) + icos((npi)/4)sinx + isin((npi)/4)cosx - cancel(sin((npi)/4)sinx) - cancel(cos((npi)/4)cosx) + icos((npi)/4)sinx + isin((npi)/4)cosx + cancel(sin((npi)/4)sinx)]#

Cancel out more terms to get:

#= (2^(n//2)e^(x))/(cancel(2i))[cancel(2i)cos((npi)/4)sinx + cancel(2i)sin((npi)/4)cosx]#

Finally, use the addition identity of #sin# to get:

#color(blue)(barul|stackrel(" ")(" "d^n/(dx^n)[e^x sinx] = 2^(n//2)e^(x)sin(x + (npi)/4)" ")|)#

Aug 21, 2017

# (d^(n))/(dx^n) e^xsinx = [sqrt(2)]^n e^x sin(x+(npi)/4) #

Explanation:

We have:

# y(x) = e^x sinx # ..... [A]

Differentiating wrt #x#, and applying the product rule we get:

# y' \ \ \ \ \= e^xcosx+e^xsinx #
# \ \ \ \ \ \ \ \ = e^x(sinx+cosx) # ..... [B]

Using the superposition property of sine and cosine, we can write the sum of '#sinx# and #cosx in the form

# sinx + cosx -= Rsin(x+alpha) #
# " " = Rsinxcosalpha + Rcosxsinalpha #
# " " = Rcosalphasinx + Rsinalpha cosx#

Then equating coefficients of #sinx# and #cosx# we get

# sinx: Rcosalpha = 1 # ..... [C]
# cosx: Rsinalpha = 1 # ..... [D]

#Eq [C]^2+Eq [D]^2: => R^2cos^2alpha+R^2sin^2alpha =2 #

# :. R^2(cos^2alpha+sin^2alpha)=1 #
# :. R=sqrt(2) #

#Eq [D] div Eq[C]: => (Rsinalpha)/(Rcosalpha)=1/1 #

# :. tan alpha = 1 => alpha = pi/4 #

In other words:

# sin x + cosx -= sqrt(2)sin(x+pi/4) # ..... [Theorem 1]

Hence, by Applying Theorem 1 to Eq[B] we can write the first derivative in the form:

# \ \ \ \ y' = e^xsqrt(2)sin(x+pi/4) # ..... [E]

Using [E], and differentiating again wrt #x#, and applying the product rule we get:

# y'' \ \ \ = e^xsqrt(2)cos(x+pi/4) + e^xsqrt(2)sin(x+pi/4) #
# \ \ \ \ \ \ \ \ = sqrt(2) \ e^x(cos(x+pi/4) + sin(x+pi/4) ) #

And applying Theorem 1 to this result we get:

# y'' \ \ \ = sqrt(2) \ e^x(cos(x+pi/4) + sin(x+pi/4) ) #
# \ \ \ \ \ \ \ \ = sqrt(2) \ e^x sqrt(2)sin(x+pi/4 + pi/4) #
# \ \ \ \ \ \ \ \ = [sqrt(2)]^2e^x sin(x+(2)pi/4 ) #

Differentiating again wrt #x#, and applying the product rule we get:

# y''' \ = [sqrt(2)]^2e^x sin(x+(2)pi/4 ) + [sqrt(2)]^2e^x \ cos(x+(2)pi/4 ) #
# \ \ \ \ \ \ \ \ = [sqrt(2)]^2e^x \ sqrt(2)sin(x+(2)pi/4 +pi/4 )#
# \ \ \ \ \ \ \ \ = [sqrt(2)]^3e^x sin(x+(3)pi/4)#

Prediction

Based on the above results, it "appears" as if the #n^(th)# derivative is given by:

# y^((n)) = [sqrt(2)]^n e^x sin(x+(npi)/4) #

So let us test this prediction using Mathematical Induction:

Induction Proof - Hypothesis

We aim to prove by Mathematical Induction that for #n in NN# that:

# (d^(n))/(dx^n) e^xsinx = y^((n)) = [sqrt(2)]^n e^x sin(x+(npi)/4) # ..... [F]

Induction Proof - Base case:

We will show that the given result, [F], holds for:

#n=0 # : (the function)
#n=1 # : (the first derivative)

When #n=0# the given result gives:

# y^((0)) = [sqrt(2)]^0 e^x sin(x+(0pi)/4) #
# " " = e^x sin(x) #
# " " = y(x) # (from [A])

When #n=1# the given result gives:

# y^((1)) = [sqrt(2)]^1 e^x sin(x+(1pi)/4) #
# " " = sqrt(2) e^x sin(x+pi/4) #
# " " = y' # (from [E])

So the given result is true when #n=1# (and in fact #n=0#)

Induction Proof - General Case

Now, Let us assume that the given result [F] is true when #n=m#, for some #m in NN, m gt 1#, in which case for this particular value of #m# we have:

# (d^(m))/(dx^m) e^xsinx = y^((m)) = [sqrt(2)]^m e^x sin(x+(mpi)/4) #

So, differentiating the above, using the product rule, we get:

# (d^(m+1))/(dx^(m+1)) e^xsinx = [sqrt(2)]^m e^x cos(x+(mpi)/4) + [sqrt(2)]^m e^x sin(x+(mpi)/4) #
# " " = [sqrt(2)]^m e^x [cos(x+(mpi)/4) + sin(x+(mpi)/4)] #
# " " = [sqrt(2)]^m e^x [sqrt(2)sin(x+(mpi)/4+pi/4)] # (by Theorem 1)

# " " = [sqrt(2)]^(m+1) e^x sin(x+((m+1)pi)/4)] #

Which is the given result [F] with #n=m+1#

Induction Proof - Summary

So, we have shown that if the given result [F] is true for #n=m#, then it is also true for #n=m+1#. But we initially showed that the given result was true for #n=0# and #n=1# so it must also be true for #n=2, n=3, n=4, ... # and so on.

Hence, by the process of mathematical induction the given result [F] is true for #n in NN# QED

Hence we have:

# (d^(n))/(dx^n) e^xsinx = y^((n)) = [sqrt(2)]^n e^x sin(x+(npi)/4) #