My question is how to use Mathematica to check if one expression can be transformed into another:

Example 1: $ax^2+bx+c$ into $K\cdot(x+\alpha)^2+\beta$, and then show me $K(a,b,c)$ and so on.

Example 2: Say I have the Maxwell equations:

$\nabla \cdot \mathbf{E} = \frac{\rho}{\varepsilon_0}$, $\nabla \times \mathbf{E} = -\dot {\mathbf{B}}$, $\nabla \cdot \mathbf{B} = 0$, $\nabla \times \mathbf{B} = \mu_0 (\varepsilon_0 \mathbf{j} + \dot{\mathbf{E}})$.

Can I follow from this an expression of the form $\alpha \ddot {\mathbf{E}}+\beta \mathbf{E}=0$?

Example 3: $c_1 \cos(\omega t) + c_2 \sin(\omega t)$ into $A cos (\omega t + \delta)$. How do I mark the dependencies, so that $A$ is $A(c_1, c_2)$ but not $A(t)$?

  • 2
    $\begingroup$ For your first, look at SolveAlways[a x^2 + b x + c == k (x + α)^2 + β, x]; for the third, look at this. $\endgroup$ May 28, 2020 at 1:32
  • $\begingroup$ Thank you! The first one works well. Is there a shortcut to turn it around, so get k(a,b,c) etc. instead of a(k,α,β) etc.? $\endgroup$
    – fT3g0
    May 29, 2020 at 11:54


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.