General formula for derivative (nth formula)

In summary, the general formula for the derivative of a function f(x) = xcos(x) is (-1)^(n+1) * sin(x) + n * cos(x). This formula can be tested for n = 2 or 3 and can be obtained by observing the pattern in the first five derivatives of the given function. It is also
  • #1
raining
8
0
Finding the General Formula for derivative (nth formula)

Given function = (x*cos(x)) or xcos(x).

Need to find the general formula for the derivative when n=n and test it for n=2 or 3.

I have taken the first five derivatives and observed a pattern, however, I'm not exactly getting the correct values for n=2 and n=3 when I plug it into my formula, which means my formula is wrong.

Need help..First five derivatives:-

(f)'= cos(x) - x sin(x)

(f)''=-2 sin(x) - x cos(x)

(f)'''=-3 cos(x) + x sin(x)

(f)''''=4 sin(x) + x cos(x)

(f)'''''=5 cos(x) - x sin(x)
 
Last edited:
Physics news on Phys.org
  • #2


raining said:
Given function = (x*cos(x)) or xcos(x).

Need to find the general formula for the derivative when n=n and test it for n=2 or 3.

I have taken the first five derivatives and observed a pattern, however, I'm not exactly getting the correct values for n=2 and n=3 when I plug it into my formula, which means my formula is wrong.

Need help..

First five derivatives:-

(f)'= cos(x) - x sin(x)

(f)''=-2 sin(x) - x cos(x)

(f)'''=-3 cos(x) + x sin(x)

(f)''''=4 sin(x) + x cos(x)

(f)'''''=5 cos(x) - x sin(x)
Hello raining. Welcome to PF !

First of all, can you describe the pattern in words?
 
Last edited:
  • #3
welcome to pf!

it's raining! welcome to pf! :smile:

looks ok :confused:

you can use the binomial thorem for nth derivatives of f(x)g(x) …

(fg)(n) = ∑ nCr f(r)g(n-r)

in this case, if f(x) = x, then f(1) = 1 and f(n) = 0 for n≥ 2 :wink:
 
  • #4
Thanks a lot SammyS and tiny-tim for your kind reply.

Basically, I need to find a general formula for the derivative such that (f)''=-2 sin(x) - x cos(x).

The pattern which I observed is that when n is an even number like 2 or 4, sin(x) is the first element of the derivative and the value of "n" is attached to it whereas when n is an odd number like 3 or 5, cos(x) is the first element and the value of "n" is attached to it.. Both of them interchange places depending upon whether n is even or odd. I simply don't know how can I generate a general formula which gives me these results for any value of n.
 
  • #5
@ tiny-tim,

are u sure the general formula can be obtained by using the binomial theorem? I basically have to get the general formula on the basis of the five derivatives I have calculated. I have to use them as a basis for my general formula.
 
  • #6
A couple of points from the derivatives you posted.
i) It looks like the coefficient (without sign) of the first term is 1, 2, 3, 4, ... n for the nth derivative.

ii) It also appears that the sign is going 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, ... Can you write that as a power of -1? Think in groups of 4. What if n= 4j, 4j+1, 4j+2, or 4j+ 3?

iii) The first term is alternating "cosine", "sine", "cosine", "sine", "cosine"... The second term is doing the same thing except that it starts with sine rather than cosine.

Perhaps it would be simplest to give one for formula for n odd and another for n even.
 
  • #7
raining said:
I simply don't know how can I generate a general formula which gives me these results for any value of n.

it's ok to treat even and odd cases separately :wink:
raining said:
@ tiny-tim,

are u sure the general formula can be obtained by using the binomial theorem? I basically have to get the general formula on the basis of the five derivatives I have calculated. I have to use them as a basis for my general formula.

your way is fine …

i just showed you the other way as a matter of interest, and also as an independent check on your result :smile:
 
  • #8
Thanks again for your kind replies.

I'll treat them separately and then check my results. Will also follow the binomial theorem as a alternative way to check my results. Thanks tim.

But is there a possibility to give one general formula? I've been asked to give one formula so... :( I'll try and post my results..
 
  • #9
You can achieve the desired result in a number of ways. It depends on your preferences and, of course, depends upon your math background. You can use a piecewise defined formula, a formula using modular arithmetic or the mod() function, perhaps some combination of absolute values, maybe ceiling or floor functions ...

The following are some sequences using sine and cosine functions. You can "shift" them by replacing n with n±1 or n±2 ...

Look at the sequences:
{ sin(nπ/2) }

{ cos(nπ/2) }

{ sin(nπ/2) + cos(nπ/2) }​
 
  • #10
As I'm a university freshman, so basically I'm unfortunately unfamiliar with modular arithmetic or the mod() function.

You can think of me as a rookie in Calculus.. so on the basis of that I should be solving this problem.

What are the options I have as a fresher?

Thanks a lot to everyone for all their help so far. Appreciate it alot.

Basically, I need a very general formula that one would expect to use at high-school or university first-year level Calculus.
 
  • #11
raining said:
As I'm a university freshman, so basically I'm unfortunately unfamiliar with modular arithmetic or the mod() function.

You can think of me as a rookie in Calculus.. so on the basis of that I should be solving this problem.

What are the options I have as a fresher?

Thanks a lot to everyone for all their help so far. Appreciate it a lot.

Basically, I need a very general formula that one would expect to use at high-school or university first-year level Calculus.

Did you kook at those sequences?

What is [itex]\displaystyle \sin\left(n(\frac{\pi}{2})\right)[/itex] when n = 1, 2, 3, 4, 5, 6, ... ?

Added in Edit:

n | sin(n π/2) | cos(n π/2)
   |               |            
1 |     1       |      0
   |               |          
2 |     0       |     -1
   |               |            
3 |    -1       |      0
   |               |            
4 |     0       |      1
   |               |            
5 |     1       |      0
   |               |            
6 |     0       |     -1
   |               |            
7 |    -1       |      0
   |               |            
8 |     0       |      1
   |               |            
9 |     1       |      0
   |               |            




 
Last edited:
  • #12
Have sent u a PM Sammy.
 

FAQ: General formula for derivative (nth formula)

What is the general formula for the nth derivative?

The general formula for the nth derivative of a function f(x) is given by: f(n)(x) = dn/dxn(f(x)), where dn/dxn represents the nth derivative operator.

How is the general formula for the nth derivative derived?

The general formula for the nth derivative is derived using the power rule, product rule, quotient rule, and chain rule. These rules are applied repeatedly for each derivative until the nth derivative is obtained.

Can the general formula for the nth derivative be used for any type of function?

Yes, the general formula for the nth derivative can be used for any type of function, as long as the function is differentiable. It can be applied to polynomials, trigonometric functions, exponential functions, and more.

What is the significance of the nth derivative?

The nth derivative represents the rate of change of the (n-1)th derivative. It can be used to analyze the behavior of a function and determine its maximum and minimum points, inflection points, and concavity.

How is the general formula for the nth derivative used in real-world applications?

The general formula for the nth derivative is used in various fields of science and engineering, such as physics, chemistry, economics, and computer science. It is used to model and analyze real-world phenomena, make predictions, and solve problems related to rates of change.

Back
Top