Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#7155 closed enhancement (duplicate)

Allow solving of inequalities

Reported by: kcrisman Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: symbolics Keywords: solve, inequality, Maxima
Cc: jason, jhpalmieri, burcin Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

From a Maxima FAQ:

(%i1) load(fourier_elim)$

(%i2) fourier_elim([abs(x - abs(5-x)) < 1],[x]);
(%o2)                          [2<x,x<3]

(%i3) fourier_elim([x + y < 1, x - y > 9],[x,y]);
(%o3)                     [y+9<x,x<1-y,y<-4]

(%i4) fourier_elim([max(-x,x) < 7 * x + 1],[x]);
(%o4)                           [-1/8<x]

From pre-release codebase:

 (%i79) to_poly_solve((x-1)*(x-6) < 0,x);
 (%o79) %union([1 < x,x < 6])

 (%i80) to_poly_solve(min(x,1) < max(-5,x),x);
 (%o80) %union([1 < x],[x < -5])

 (%i81) to_poly_solve(min(x,1) # max(x,4),x);
 (%o81) %union([1 < x,x < 4],[4 < x],[x = 1],[x < 1],[x = 4])

 (%i82)  to_poly_solve((x+1)/(x-1) < 4,x);
 (%o82) %union([5/3 < x],[x < 1])

So it should not be too hard to wrap this, checking input/output for < or > or something. This is one of those basic things people want, but which we assume it's too hard to write from scratch (which it probably is!).

Change History (3)

comment:1 follow-up: Changed 11 years ago by kcrisman

  • Resolution set to duplicate
  • Status changed from new to closed

This is now a duplicate of #7325, which already has a first patch, so I am closing this ticket.

comment:2 in reply to: ↑ 1 Changed 11 years ago by mvngu

Replying to kcrisman:

This is now a duplicate of #7325, which already has a first patch, so I am closing this ticket.

kcrisman, please don't close tickets. That's the job of the release manager. See this section of the Developer's Guide for conventions on closing tickets.

comment:3 Changed 11 years ago by mvngu

  • Milestone changed from sage-4.2.1 to sage-duplicate/invalid/wontfix
Note: See TracTickets for help on using tickets.