Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplifications Involving Absolute value #181

Open
andrew-murdza opened this issue Jul 5, 2024 · 0 comments
Open

Simplifications Involving Absolute value #181

andrew-murdza opened this issue Jul 5, 2024 · 0 comments
Labels
feature New feature or enhancement

Comments

@andrew-murdza
Copy link

andrew-murdza commented Jul 5, 2024

Piecewise definition:

  • |-x|->|x|
  • {match:'|x|',replace:'x',condition:'x\ge0'} (e.g. |x^2|)
  • {match:'|x|',replace:'-x',condition:'x\le0'} (e.g. |1-\sqrt{2}|)

Products and Quotients:

  • {match:'|xy|',replace:'x|y|',condition:'x\ge0'}
  • {match:'|xy|',replace:'-x|y|',condition:'x\le0'}
  • {match:'|\frac{x}{y}|',replace:'\frac{x}{|y|}',condition:'x\ge0'}
  • {match:'|\frac{x}{y}|',replace:'-\frac{x}{|y|}',condition:'x\le0'}
  • |xy|->|x||y| or |x||y|->|xy| (choose 1) helps with stuff like |x|x
  • |\frac{x}{y}|->\frac{|x|}{|y|} or \frac{|x|}{|y|}->|\frac{x}{y}| (choose 1)

Powers:

  • {match:'|x|^n',replace:'x^n',condition:'n is an even integer'}
  • {match:'|x|^{\frac{n}{m}}',replace:'x^{\frac{n}{m}}',condition:'n is an even integer and m is an odd integer'}
  • {match:'|x^n|', replace:'|x|^n',condition:'n is not an even integer or a rational with even numerator and odd denominator'}

Even functions:

  • \cos(|x|)->\cos(x)
  • \sec(|x|)->\sec(x)
  • \cosh(|x|)->\cosh(x)
  • \sech(|x|)->\sech(x)
  • Even better: {match:'f(|x|)',replace:'f(x)',condition:'f is even'}

Odd functions:

  • |\sin(x)|->\sin(|x|)
  • |\tan(x)|->\tan(|x|)
  • |\cot(x)|->\cot(|x|)
  • |\csc(x)|->\csc(|x|)
  • |\arcsin(x)|->\arcsin(|x|)
  • |\arctan(x)|->\arctan(|x|)
  • |\arccot(x)|->\arccot(|x|)
  • |\arccsc(x)|->\arccsc(|x|)
  • |\sinh(x)|->\sinh(|x|)
  • |\tanh(x)|->\tanh(|x|)
  • |\coth(x)|->\coth(|x|)
  • |\csch(x)|->\csch(|x|)
  • |\arcsinh(x)|->\arcsinh(|x|)
  • |\arctanh(x)|->\arctanh(|x|)
  • |\arccoth(x)|->\arccoth(|x|)
  • |\arccsch(x)|->\arccsch(|x|)
  • Even better: {match:'|f(x)|',replace:'f(|x|)',condition:'f is odd'}
@andrew-murdza andrew-murdza added the feature New feature or enhancement label Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or enhancement
Development

No branches or pull requests

1 participant