MathGroup Archive 2004

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

Search the Archive

Re: Re: Re: Forcing a Derivative


This works:

f[x_] := x^2 + 7
g[x_] = 3*x^3 + 23
h = Exp[7#] &
f''
g''
h''

23 + 3*x^3
E^(7*#1) &
2 &
18*#1 &
49*E^(7*#1) &

This doesn't get us anywhere:

(f g)'

(f g)'

But should it?

Are f and g functions of the same variable? If not, which variable are we differentiating with respect to? The Derivative function is designed for partial derivatives; it needs to know those answers. And so do we, if we're trying to make sense of (f g)'.

Is it as simple as assuming there's only one variable? Maybe. But maybe not, when you start throwing arbitrary problems at it.

Anyway, the one-variable case is a very limited one.

Bobby

On Tue, 21 Sep 2004 03:49:15 -0400 (EDT), Murray Eisenberg <murray at math.umass.edu> wrote:

> So really the questions is:  WHY doesn't -- or, perhaps, why shouldn't
> -- Mathematica understand such things as (f g)'?  Or (f + g)' ,etc.???
>
> Is there something in the language design that would prevent a meaning
> (the conventional one!) being assigned?  Or is it just that this hasn't
> been implemented.
>
> I note that I have persistently found this a frustrating limitation of
> the language when I have used it for teaching.  One of the more
> difficult things to teach is the concept of a function as itself an
> object that can be manipulated.  It would be awfully nice if Mathematica
> allowed that to be so.
>
> Andrzej Kozlowski wrote:
>  >
>  > Mathematica does not understand that you mean by f*g the function that
>  > takes x to f(x)*g(x). There are various ways to deal with this > issue...
>  > On 19 Sep 2004, at 16:56, Scott Guthery wrote:
>  >
>  >>How does one force Derivative[n] to actually take the derivative?
>  >>
>  >>For example if ...
>  >>f[x_] = x^2 + 7
>  >>g[x_]=3x^3 + 23
>  >>then
>  >>Derivative[2][f * g]
>  >>just puts a couple of primes on the product rather than actually
>  >>computing the dervative.
>
> Andrzej Kozlowski wrote:
>
>> On 19 Sep 2004, at 16:56, Scott Guthery wrote:
>>
>>
>>> *This message was transferred with a trial version of CommuniGate(tm)
>>> Pro*
>>> How does one force Derivative[n] to actually take the derivative?
>>>
>>> For example if ...
>>>
>>> f[x_] = x^2 + 7
>>>
>>> g[x_]=3x^3 + 23
>>>
>>> then
>>>
>>> Derivative[2][f * g]
>>>
>>> just puts a couple of primes on the product rather than actually
>>> computing the dervative.
>>>
>>> Thanks for any insight.
>>>
>>> Cheers, Scott
>>>
>>>
>>
>> Mathematica does not understand that you mean by f*g the function that
>> takes x to f(x)*g(x). There are various ways to deal with this issue,
>> but the simplest are:
>>
>> Derivative[2][f[#]*g[#] &][x] // Expand
>>
>> 60*x^3 + 126*x + 46
>>
>> or
>>
>>
>> Expand[D[f[x]*g[x], {x, 2}]]
>>
>> 60*x^3 + 126*x + 46
>>
>>
>>
>> Andrzej Kozlowski
>> Chiba, Japan
>> http://www.akikoz.net/~andrzej/
>> http://www.mimuw.edu.pl/~akoz/
>>
>>
>



-- 
DrBob at bigfoot.com
www.eclecticdreams.net


  • Prev by Date: Re: Re: Re: How to simplify to a result that is real
  • Next by Date: Re: Re: Re: Re: How to simplify to a result that is real
  • Previous by thread: Re: Re: Forcing a Derivative
  • Next by thread: Re: Forcing a Derivative