MATLAB Answers

# How to simplify this symbolic equation - nominator and denominator manipulation

4 views (last 30 days)
Tomi Makkonen on 1 May 2021
Commented: Tomi Makkonen on 4 May 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 CommentsShowHide -1 older comments

Sign in to comment.

### Accepted Answer

John D'Errico on 1 May 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
eq1 = solvedeq1=simplify((solve(eq1, t)))
solvedeq1 = solvedeq1(2)
ans = Having done that, now undo the transformation, but do NOT use symplify which may screw things up.
subs(solvedeq1(2),u,v/c)
ans = Note that I had to use solvedeq1(2) to give the positive solution.
##### 1 CommentShowHide None
Tomi Makkonen on 4 May 2021
Thank you John.

Sign in to comment.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!