TransWikia.com

Why RegionPlot does not show the negative part of a function?

Mathematica Asked by user73733 on October 22, 2021

I have this function

$$ f(x)=frac{1-25 x^2}{left| 25 x^2-1right| };frac{2500 x}{sqrt{left(25 x^2-1right)^2 sinh (pi x)+9}}+cosh ^{-1}left(frac{1000 x^2+left(25 x^2-1right)^2}{left(25 x^2+1right)^2}right) $$

 f[x_] := ArcCosh[(1000 x^2 + (-1 + 25 x^2)^2)/(1 + 25 x^2)^2] + (
    1 - 25 x^2)/Abs[-1 + 25 x^2] (2500 x )/ Sqrt[
    9 + (-1 + 25 x^2)^2 Sinh[π  x]]; 

for $0<x<5$. I plot this function and I get

enter image description here

As can be seen, for $0.2<x<1$, function is decreasing first and then increasing. Therefore $f'(x)$ must be negative and positive. Also, $f'(x)$ must be zero at one point. But when I use RegionPlot to see where $f'(x)$ is negative, it says nowhere. Also, I try to Plot $f'(x)$, but I get no answer. Does someone know where I am making mistake?

RegionPlot[a (f'[x]) < 0, {x, 0.2, 1}, {a, 0, 1}]
Plot[f'[x], {x, 0.2, 1}]
ContourPlot[a (f'[x]) == 0, {x, 0, 1}, {a, 0, 1}]

One Answer

The problem is that Abs has no built in derivative.

One solution is setting

Abs'[x_] := HeavisideTheta[x]

Then you can do

Plot[f'[x], {x, 0, 1}]

Plot of the first derivative of the OP's function

Answered by Natas on October 22, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP