Closed Eduap-com closed 1 year ago
Denne regel fejler. Der er indført errcatch.
defrule(lambertwrule2, aliznotxalizpositive^(aliznotzerosolvar+aliznotx2)+aliznotx3+aliznotx4solvar=0, block([z,numer:not(uselambertw)],if errcatch(z:aliznotzerolog(alizpositive)/aliznotx4aliznotxalizpositive^(aliznotx2-aliznotzeroaliznotx3/aliznotx4))=[] then return(aliznotxalizpositive^(aliznotzerosolvar+aliznotx2)+aliznotx3+aliznotx4solvar=0), if z<-1/%e then return([]),if z<0 then return([solvar=-generalized_lambert_w(0,z)/(aliznotzerolog(alizpositive))-aliznotx3/aliznotx4, solvar=-generalized_lambert_w(-1,z)/(aliznotzerolog(alizpositive))-aliznotx3/aliznotx4]),solvar=-lambert_w(z)/(aliznotzero*log(alizpositive))-aliznotx3/aliznotx4))$
Maxima kan ikke løse ligningen e^(-x)=2 Med Geogebra som CAS-motor virker det.
Debug giver: (%i3) (%o4) fejl expt: undefined: 0 to a negative exponent.
0: applyrulelistZero(exprq=[%e^x = 1/2,%e^-x = 0],qrul=lambertwrule2)
1: solverecursive(lignq=[%e^x = 1/2,%e^-x = 0],varq=x,condq=condq)
2: solverecursive(lignq=[2*%e^x-1 = 0,%e^-x = 0],varq=x,condq=condq)
-- an error. To debug this try: debugmode(true); (%o7) false (%o8) false