MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Derivative of BernsteinBasis functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118344] Derivative of BernsteinBasis functions
  • From: "Rob Y. H. Chai" <yhchai at ucdavis.edu>
  • Date: Sat, 23 Apr 2011 07:50:33 -0400 (EDT)

Hello everyone,

I'm trying to compute the second derivative of a function g[x_] that
involves a combination of Bernstein Basis functions. Mathematica version 7 was able to compute the derivative, but version 8 gave a problem. 

In[1]:= {$Version,$ReleaseNumber}

Out[1]= {7.0 for Microsoft Windows (32-bit) (February 18, 2009),1}

In[2]:= g[x_] = -BernsteinBasis[5,0,x]+6 BernsteinBasis[5,1,x]-15
BernsteinBasis[5,2,x]+20 BernsteinBasis[5,3,x]-15 BernsteinBasis[5,4,x]+6
BernsteinBasis[5,5,x]

Out[2]= -BernsteinBasis[5,0,x]+6 BernsteinBasis[5,1,x]-15
BernsteinBasis[5,2,x]+20 BernsteinBasis[5,3,x]-15 BernsteinBasis[5,4,x]+6
BernsteinBasis[5,5,x]

In[3]:= D[g[x],{x,2}]

Out[3]= -20 BernsteinBasis[3,0,x]+30 (-4 BernsteinBasis[3,0,x]-4
(BernsteinBasis[3,0,x]-BernsteinBasis[3,1,x]))-75 (4
(BernsteinBasis[3,0,x]-BernsteinBasis[3,1,x])-4
(BernsteinBasis[3,1,x]-BernsteinBasis[3,2,x]))+100 (4
(BernsteinBasis[3,1,x]-BernsteinBasis[3,2,x])-4
(BernsteinBasis[3,2,x]-BernsteinBasis[3,3,x]))-75 (4
(BernsteinBasis[3,2,x]-BernsteinBasis[3,3,x])-4 BernsteinBasis[3,3,x])+120
BernsteinBasis[3,3,x]

But 

 

{$Version,$ReleaseNumber}

{8.0 for Microsoft Windows (32-bit) (February 24, 2011),1}

 

D[g[x],{x,2}]

 

Gives an error. Any thoughts? 

 

Thanks.

 

Rob Chai


  • Prev by Date: Re: How to roll up multiple Line calls into a loop
  • Next by Date: Re: How to roll up multiple Line calls into a loop
  • Previous by thread: "Curve-threading" surface interpolation?
  • Next by thread: Re: Derivative of BernsteinBasis functions