Open andrew-murdza opened 2 months ago
Piecewise definition:
|-x|->|x|
{match:'|x|',replace:'x',condition:'x\ge0'}
|x^2|
{match:'|x|',replace:'-x',condition:'x\le0'}
|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|
|x||y|->|xy|
|x|x
|\frac{x}{y}|->\frac{|x|}{|y|}
\frac{|x|}{|y|}->|\frac{x}{y}|
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)
{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|)
{match:'|f(x)|',replace:'f(|x|)',condition:'f is odd'}
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)
{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|)
{match:'|f(x)|',replace:'f(|x|)',condition:'f is odd'}