ForHosting KIT · Math

Logarithm expand & condense

Expand log(x²y/z) into 2 log x + log y − log z, or pack such a sum back into a single logarithm, with each law named step by step. Works with ln, log base ten, base two or any valid base. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon

Runs in your browser. Free, unlimited — your data never leaves this page.

A logarithm expand and condense tool rewrites log expressions with the three classic laws every algebra course teaches. Expand turns one log of a product, quotient, or powered factor into a sum of simpler logs; condense does the reverse and packs a linear combination of logs into a single log of a product or quotient. You send a mode, an optional base (natural, common, binary, or any valid number), and a list of positive arguments with powers or coefficients.

Product, quotient, and power laws for logarithms

Three identities rewrite almost every classroom log expression over the positive reals. The product law says the log of a product equals the sum of the logs: log of A times B equals log A plus log B, for any fixed base greater than zero and not equal to one. The quotient law says the log of a quotient equals a difference: log of A over B equals log A minus log B.

The power law says the log of a power brings the exponent in front: log of A to the n equals n times log A. Combined, log of x squared times y over z expands into two log x plus log y minus log z. Condensing walks the same path backward: a sum of coefficient times log terms becomes one log of a product of powered factors, with negative coefficients landing in the denominator.

Bases may be the natural base e written as ln, common base ten, binary base two, a generic log with no subscript, or any other valid numeric base. Arguments must stay strictly positive when they are numbers; symbols are treated as classroom variables that stand for positive quantities. Zero and negative numeric arguments are domain errors, not aesthetic choices, and this tool refuses them instead of returning a complex value.

Teachers use the same three laws for simplification drills, exam keys, and computer-algebra sanity checks, so a deterministic expand-or-condense response with named laws applied is more useful than a black-box simplification that hides which identity fired.

Practical tips, limits, and related searches

Keep every numeric argument strictly positive and every numeric base positive and not equal to one so the real logarithm domain is respected. Prefer symbols for pure algebraic homework and numbers when you also want domain checks on concrete values. Power zero factors contribute nothing and are skipped with an explicit step.

This landing targets people searching for logarithm expand, condense logs, product quotient power rule calculator, or log laws online; it is not a change-of-base numerical evaluator, not a full symbolic CAS, and not a solver for logarithmic equations. Prefer this capability when you already have factors or summands and only need the law-based rewrite; if your source is a free-form string with nested parentheses, parse it into terms first.

What does expand mode do?

Expand takes one logarithm of a product, quotient, or powered factors (your terms as arg^power inside the log) and rewrites it as a sum of coefficient times log(arg) using the product, quotient, and power laws.

What does condense mode do?

Condense takes a sum of power·log(arg) terms and rewrites it as a single log of a product/quotient of the powered arguments.

Which bases are supported?

Omit base for generic log, use e/ln for natural log, 10 for common log, 2 for binary log, or any positive number other than 1. Invalid bases are rejected.

Is the logarithm expand tool free?

The browser tool is free and runs locally.

Why must the numbers inside the logarithm be positive?

Because the real logarithm is only defined for positive values, so a number of zero or below is rejected. Letters such as x or y are treated as positive quantities, as is usual in algebra classes.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/algebra/log-expand

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/algebra/log-expand \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode":"expand","terms":[{"arg":"x","power":2},{"arg":"y","power":1},{"arg":"z","power":-1}]}'
{
  "mode": "expand",
  "terms": [
    {
      "arg": "x",
      "power": 2
    },
    {
      "arg": "y",
      "power": 1
    },
    {
      "arg": "z",
      "power": -1
    }
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "algebra.log_expand",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_terms32
max_abs1000000000000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Numeric arguments that are zero or negative are rejected with invalid_input because they leave the real logarithm domain.

How to call the API and what comes back

In expand mode the terms are factors inside a single logarithm: arg raised to power multiplies inside the log, and negative powers become quotient factors. In condense mode the same fields mean power times log of arg in a sum that collapses to one log. Send a JSON body with required mode set to expand or condense, optional base as a string or number, and required terms as a non-empty array of objects. Each term needs arg, a positive number or a simple symbol such as x or a1, and may include power (aliases coeff, coefficient, exp, n) defaulting to one. Aliases mode operation and action, base log_base and radix, and terms factors and parts are accepted. On success the response includes mode, base, base_label such as ln or log_10, input_expression, result_expression, a terms array with coeff, arg, and per-term expression strings, laws_applied listing power product quotient or identity, ordered steps, and a short message. Failed validation—missing mode or terms, empty terms, more than thirty-two terms, invalid base one or non-positive base, non-finite powers, or a non-positive numeric argument—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price.

Practical tips, limits, and related searches

Limit each request to at most thirty-two terms and absolute values at most one trillion so intermediate formatting stays readable. When teaching, pair examples: expand log_10 of x squared times y over z into two log_10 x plus log_10 y minus log_10 z; condense two ln a plus ln b into ln of a squared times b; and deliberately send arg minus three to demonstrate the hard invalid_input path on non-positive arguments. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners probe the domain. Round-trip checks are easy: expand then condense with the same base and terms should recover equivalent product form, and the laws_applied list should mention every identity you expect for multi-factor mixed-sign inputs.

Homework checks for log law rewrites

Students enter factors with powers and compare hand-written expand or condense steps against a deterministic result_expression and laws_applied list before submitting.

Unit tests for student log simplifiers

Generate known-good expand and condense cases plus deliberate non-positive argument rejections for coding kata expected values.

Worksheet answer keys for teachers

Build answer keys that show input_expression, result_expression, and ordered steps for product, quotient, and power drills across ln, log_10, and generic log.

Why must arguments be positive?

Over the reals, log_b(x) is only defined for x > 0 (with base b > 0, b ≠ 1). Zero or negative numeric arguments return invalid_input instead of a complex value.

Read the full KIT documentation →