3
$\begingroup$

There is an equation:

(-3 + 4 k^2)/(-6 + m^2) == 1

and a fraction:

Sqrt[m^2]/Sqrt[1 + k^2]

How can the equation be used to replace m ^ 2 in the fraction?

The expected result is:

Sqrt[4 k^2 + 3]/Sqrt[1 + k^2]

edit1: thank you Syed!If the formula contains x0 and x0 ^ 2, how to replace only the x0 ^ 2 items in the formula, and keep x0 without replacing.

eqn = x0^2/a^2 + y0^2/b^2 == 1

a fraction:

y - y0 == (x - x0) (-x0 y0 + Sqrt[-a^2 b^2 + b^2 x0^2 + a^2 y0^2])/( a^2 - x0^2)

use:

y - y0 == (x - x0) (-x0 y0 + Sqrt[-a^2 b^2 + b^2 x0^2 + a^2 y0^2])/(
    a^2 - x0^2) /. Solve[eqn,x0^2] // FullSimplify

Tt is running error

My problem is to use equation eqn to replace x0 ^ 2 in the formula, and x0 is not replaced. How to operate, the desired results are:

y0 (-x x0 + a^2 (1 - (y y0)/b^2))

$\endgroup$

1 Answer 1

5
$\begingroup$

One possible way:

eq1 = (-3 + 4 k^2)/(-6 + m^2) == 1;
Sqrt[m^2]/Sqrt[1 + k^2] /. Solve[eq1, m]

$$\left\{\frac{\sqrt{4 k^2+3}}{\sqrt{k^2+1}},\frac{\sqrt{4 k^2+3}}{\sqrt{k^2+1}}\right\}$$

$\endgroup$
3
  • $\begingroup$ thank you.I have updated the question $\endgroup$
    – csn899
    Commented Jan 27, 2023 at 0:51
  • $\begingroup$ If the formula contains x0 and x0 ^ 2, how to replace only the x0 ^ 2 items in the formula, and keep x0 without replacing. $\endgroup$
    – csn899
    Commented Jan 27, 2023 at 1:13
  • 1
    $\begingroup$ Please start a new post and move the new query and edits there. Thanks. $\endgroup$
    – Syed
    Commented Jan 27, 2023 at 2:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.