How to simplify this symbolic equation - nominator and denominator manipulation
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Tomi Makkonen
el 1 de Mayo de 2021
Comentada: Tomi Makkonen
el 4 de Mayo de 2021
Hi,
I am solving well known equation:
syms c t tau
eq1 = (c*t)^2 == (c*tau)^2+(v*t)^2
solvedeq1=simplify((solve(eq1, t)))
solvedeq1(1)
Now the standard way of giving the answer is:
How do I manipulate MATLAB to give me this final form? I have tried randomly to apply all possible symbolic commands.
Thank you for your time.
0 comentarios
Respuesta aceptada
John D'Errico
el 1 de Mayo de 2021
I never did understand why people worry about making a symbolic tool give a result in a mathematically identical form, that happens to look as you want to write it. Can you spend an hour figuring out how to produce a form that looks as you want? Probably. Why?
You want to solve this essentially in a non-dimensional form for v. So write the equation by dividing by c^2. We will use the transformation u = v/c.
syms c t tau v u
eq1 = (t)^2 == (tau)^2+(u*t)^2
solvedeq1=simplify((solve(eq1, t)))
solvedeq1(2)
Having done that, now undo the transformation, but do NOT use symplify which may screw things up.
subs(solvedeq1(2),u,v/c)
Note that I had to use solvedeq1(2) to give the positive solution.
Más respuestas (0)
Ver también
Categorías
Más información sobre Conversion Between Symbolic and Numeric en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!