HP Forums

Full Version: Polynomial derivative causes Prime to Crash?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!

Perhaps just trying to save some time while finding the derivative of this polynomial function:
d/dx(5x^(3/5)+4x^(3/4)) ... using the Prime Virtual Calculator, it failed causing the Emulator to crash, then I tried to solve it separating each term to find out the symbolic results are no the ones I expected.
[attachment=3753]
[attachment=3754]
I noticed that evaluating the derivative numerically it returns correct values... but symbolically I'm not sure, what do you think?

Thank you.
Well, the answer is correct, you got to simplify yourself.
Arno
I don't think it crashes (at least it does not inside Xcas), but you would have to wait much too long, I will change some parameters to avoid that (maximum degree for common algebraic extension built for simplifications).
In xcas diff(5*x^(3/5)+4*x^(3/4),x) returns:

3/(x^(1/5))^2+3*1/(x^(1/4))^3*sqrt(x)

However, simplify(diff(5*x^(3/5)+4*x^(3/4),x)) returns:

Code:
rootof([[1849290596989009920*x^3-144653156352000000*x^2+21432560400000000000*x+76904296875000,3178468213574860800​*x^3+7094037381120000000*x^2+2440993500000000000*x-116729736328125,9635845027921920000*x^3-386546688000000000*x^2+229471875000000000*x,7879278565785600000*x^3-1874283840000000000*x^2-22113281250000000*x,(-9423782220272762880)*x^4+1713490624512000000*x^3-107266723200000000000*x^2+1757812500000000*x,(-23106632681898639360)*x^4-34563695837184000000*x^3-98018458200000000000*x^2+71411132812500*x,(-62818287878563430400)*x^4-25623209410560000000*x^3-10937965500000000000*x^2+487518310546875*x,(-72469455631810560000)*x^4+9139958784000000000*x^3-886802343750000000*x^2,19445417291078959104*x^5-40962633184051200000*x^4+223432480800000000000*x^3+86163574218750000*x^2,(-449515361885057187840)*x^5+101669760663552000000*x^4-5546714328000000000000*x^3-29462585449218750*x^2,(-708857389430907863040)*x^5-1855984556261376000000*x^4-502953623550000000000*x^3+31589813232421875*x^2,(-2431921742405015961600)*x^5+130928497781760000000*x^4-44452603406250000000*x^3-796508789062500*x^2,(-20610723694661074944)*x^6-1971674608293642240000*x^5+265932066816000000000*x^4+7454288671875000000*x^3,(-1129025475352763301888)*x^6-157730966234726400000*x^5-13308929464680000000000*x^4-767644409179687500*x^3,(-2769378177893825249280)*x^6-4396264306606080000000*x^5-8788632003900000000000*x^4+115511627197265625*x^3,(-6561699281264726507520)*x^6-2377594621145088000000*x^5-1056820966931250000000*x^4+32634887695312500*x^3,12198562540686409728*x^7-9550672312568433868800*x^6+1825856668567680000000*x^5-57416284212890625000*x^4+711822509765625*x^3,(-156421643493552685056)*x^7-2674904881032069120000*x^6-2496402776412000000000*x^5+2680500750732421875*x^4,(-138243318795485577216)*x^7-1439651046187008000000*x^6+2043538964595000000000*x^5-236938568115234375*x^4,(-298436070998016000000)*x^7+493404453398016000000*x^6-194979280837500000000*x^5+10898437500000000*x^4],[1,0,0,0,-5*x,-4*x,0,0,10*x^2,-260*x^2,6*x^2,0,-10*x^3,-620*x^3,-340*x^3,-4*x^3,5*x^4,-140*x^4,110*x^4,-20*x^4,-x^5+x^4]])

with these warnings:

Warning, choice of an algebraic branch for root of a polynomial with parameters might be wrong. The choice is done for parameters value=0 if 0 is regular, otherwise randomly. Actual choice is Vector [92]
Warning, replacing 92 by 92.0, a substitution variable should perhaps be purged.
Warning, replacing 92 by 92.0, a substitution variable should perhaps be purged.
Warning, replacing 92 by 92.0, a substitution variable should perhaps be purged.
Warning, replacing 92 by 92.0, a substitution variable should perhaps be purged.
Warning, replacing 92 by 92.0, a substitution variable should perhaps be purged.
Warning, replacing 92 by 92.0, a substitution variable should perhaps be purged.
Warning, replacing 92 by 92.0, a substitution variable should perhaps be purged.
Warning, replacing 92 by 92.0, a substitution variable should perhaps be purged.
Evaluation time: 66.129

What am I doing wrong?

-road
Thank you Parisse, I appreciate you will do that for us.
3*x^(-2/5) == diff(5*x^(3/5)) [enter] returns 1 (true)

[up] [up] [copy] => 3*x^(-2/5) == 5*x^(3/5)' [enter] returns 1 (true) ok, but shifted the single quotation mark out of the entire expression, in this case not fails, because 5 is taken as constant

should be
[up] [up] [copy] =>3*x^(-2/5) == (5*x^(3/5))'

in the following case fails
diff(x/y) [enter] returns 1/y ok
but
[up] [up] [copy] => x/y' [enter] returns ±∞. BUG CONFIRMED

should be
[up] [up] [copy] => (x/y)' [enter] 1/y ok

FOR HP-PRIME TEAM

solution to bug

diff(expr) => parser as (expr)' and not as expr'


---------------------------------

for Bernard, we would see the solution as we make to naturally

diff(5*x^(3/5) => 3*x^(-2/5) or 3/x^(2/5) and not 3*(x^(1/5))^3/x (is not so simplified superficially)

as you can improve the simplifier?
roadrunner: nothing is wrong. You get the result as rootof(P,Q) i.e. P(alpha) where Q(alpha)=0. This is because the simplifier rewrite all algebraic extensions in a unique one, in order to certify that it will not miss a simplification, the analog as when you add fractions like 1/2+1/3+1/6 you can get a simplification to an integer. However here it requires heavy computations.
I would recommend not to run simplify on expressions with fractional powers, by the way the title of the topic is misleading, this is not a polynomial derivative.

Regarding fractional powers, the CAS rewrites them as polynomials over simpler intermediate variables, here x^(3/5) as x^(1/5)^3.
Reference URL's