semi-newbie | differences in solve



----maxima-bounces at math.utexas.edu wrote: -----


>whereas?linsolve(df,p)?yields?p=y/N?as?expected.?

The function linsolve doesn't check for linearity, so calling linsolve
on a nonlinear equation is hazardous; example

Bogus:

 (%i16) linsolve(p + p^3-42,p);
 (%o16) [p=42]

There is an alternative solver in Maxima (to_poly_solve), but it isn't able to solve
this equation either:

 (%i17) load(to_poly_solver)$
 (%i18) %solve(factor(df),p);
  Nonalgebraic argument given to 'topoly' unable to solve
 (%o18) %solve([((1-p)^(N-y)*p^(y-1)*(p*N-y))/(p-1)],[p])

Examples of eqquations that the to_poly_solve package can solve:

 (%i23) %solve(x - 19/4 = sqrt(x - 5),x);
 (%o23) %union([x=21/4])

 (%i25) %solve([max(x,x-y)=10, min(x+y,8)=-12],[x,y]);
 (%o25) %union([x=-1,y=-11])

--Barton