Re: Gradient function bug

croob shared this question 14 years ago
Answered

When I enter a function of the form f(x) = a*x^n +b*x^2+c*x+d

the gradient function f'(x) is only graphed for x>= 0 for some reason.


Tobias

Comments (9)

photo
1

i think that x^n is internaly defined with logs and so x must be >0


at that moment you can try sgn(x)*abs(x)^n when n is odd number


saludos

photo
1

When I enter a function of the form f(x) = a*x^n +b*x^2+c*x+d

the gradient function f'(x) is only graphed for x>= 0 for some reason.


Tobias


Hi Tobias


Confirmed.


f'(x) is only graphed for x> 0 because of the domain of the function ln(x).

But the expression of f'(x) is not correct...


http://www.geogebra.org/en/...

photo
1

It seems that in version 3, functions are defined differently. In version 2.7, GeoGebra had no problem graphing the gradient function of f(x) = ax^n+bx for all real x. Does anyone know why things were redefined?


Tobias

photo
1

But the expression of f'(x) is not correct...


http://www.geogebra.org/en/...


Looks fine to me... it's just not simplified :)


There's another thread somewhere that explains about the change in 3.0 but I can't find it (searching for x^(1/3) doesn't seem to work in the forums)

photo
1

When n = 2, f(x) = ax^n+bx has a linear gradient function with a domain of all real x. However, GeoGebra only shows the gradient function for a domain of x>0. This is incorrect.


Tobias

photo
1

When n = 2, f(x) = ax^n+bx has a linear gradient function with a domain of all real x. However, GeoGebra only shows the gradient function for a domain of x>0. This is incorrect.



no it's not, because the definiton of a^n for general n is e^(nloga)

photo
1

if you define f(x)=polynomial[a x^n+b x^2+c x+d] derivate work correctly for integer "n" and all real x


saludos

photo
1

if you define f(x)=polynomial[a x^n+b x^2+c x+d] derivate work correctly for integer "n" and all real x


saludos


Obrigado, mathmagic.


Saludos

photo
1

Thanks. Now it works. I never had to do that with version 2.7.


Cheers


Tobias

© 2021 International GeoGebra Institute