derived - Differentiation using r -



derived - Differentiation using r -

i'm new using r or type of programming , i'm trying differentiate 3xcos(xy) respect x. i've tried 4 different ways , wondering 1 best/correct.

d(expression(3*x*cos(xy)),"x") d(expression(3*x*cos*(xy)),"x") d(expression(3*x*cos*(xy)),"x") d(expression(3*x*cos*(x*y)),"x")

thanks in advance shane

none of those.

this right expression:

d(expression(3*x*cos(x*y)),"x") #3 * cos(x * y) - 3 * x * (sin(x * y) * y)

this treats xy 1 variable:

d(expression(3*x*cos(xy)),"x") #3 * cos(xy)

this treats xy 1 variable , cos variable (and not function):

d(expression(3*x*cos*(xy)),"x") #3 * cos * (xy)

this treats cos variable:

d(expression(3*x*cos*(x*y)),"x") #3 * cos * (x * y) + 3 * x * cos * y

r derived differentiation

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -