Mathematica takes wrong derivative

• To: mathgroup at smc.vnet.net
• Subject: [mg59650] Mathematica takes wrong derivative
• From: "Mukhtar Bekkali" <mbekkali at gmail.com>
• Date: Tue, 16 Aug 2005 04:39:31 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```I believe Mathematica 5.0.1.0 takes wrong derivative. See my code below
where I plotted the function D2 and its derivative. The derivative is
obviously wrong.

[quote]

\!\(\(Clear["\<Global`*\>"];\)\[IndentingNewLine]
{r, u, Î», Ï?, Î³} = {2, 4, \(9\/10\) u\/\(1 + u\), 1 - \(Î»\/\(1 -
Î»\)\) 1\/u, \
\((1 - Î²)\)\^r\/\(\(Î²\^Î²\) \((1 - Î²)\)\^\(1 -
Î²\)\)}\[IndentingNewLine]
\(z1 = \((\(Î²\^Î²\) \(\((1 - Î²)\)\^\(1 -
Î²\)\) Î³ \((\(\(\ \)\(u\)\)\/\(1 + u\))\))\)\^\(-1\);\)\
\[IndentingNewLine]
\(z2 = \((\(Î´\^Î²\) \(\((1 - Î´)\)\^\(1 - Î²\)\) Î³ \((\(u \((1 -
Î²)\)\)\/\(u \
\((1 - Î²)\) + 1\))\)\^\(1 - Î²\))\)\^\(-1\);\)\[IndentingNewLine]
V21 := NIntegrate[z2\^\(-u\), {Î², 0, \(Î´ \((1 + u)\)\)\/u}]\
\[IndentingNewLine]
V22 := NIntegrate[z1\^\(-u\), {Î², \(Î´ \((1 + u)\)\)\/u, 1}]\
\[IndentingNewLine]
D2[Î´_?NumericQ] := \((Î´\
V21 + NIntegrate[\(\(Î²\ u\)\/\(1 + u\)\) z1\^\(-u\), {Î², \(Î´
\((1 + \
u)\)\)\/u, 1}])\) \((V21 + V22)\)\^\(-Ï?\)\[IndentingNewLine]
\(Plot[Evaluate[D2[Î´]], {Î´, 0, u\/\(1 + u\)}];\)\[IndentingNewLine]
\(Plot[Evaluate[D[D2[Î´], Î´]], {Î´, 0, u\/\(1 + u\)}];\)\)

[/quote]

```

• Prev by Date: Re: NSolve problem
• Next by Date: Re: NSolve problem
• Previous by thread: Re: Problem finding integral of exponentials
• Next by thread: Re: Mathematica takes wrong derivative