# Any tips on how to work with complicated expressions?

1. Jun 9, 2015

### cryora

1. The problem statement, all variables and given/known data
I'm not exactly where a question like this would belong, so I am going to try here. It feels like as we go higher in our courses, we're expected to be able to work with more complicated equations. One example would be a problem involving transmission reflection ratios for waves:

An infinite continuous string with tension, τ, and at the ends has a point mass, m, attached to it at x=0. The mass is attached to a spring with natural frequency ω0 and is at equilibrium when the string is straight. A wave is incident from the left. Find the transmission and reflection ratios.

(There is no gravity in this problem)

2. Relevant equations
I already know the solution, but it starts with writing the Lagrangian by first assuming the string is made up of discrete masses (q0 being the generalized coordinate for the transverse displacement of mass m from equilibrium):
$$L=T-V$$
$$L=\sum_{j\neq 0} \frac{1}{2} \mu \dot{q_j}^2 + \frac{1}{2} m \dot{q_0}^2 - \frac{\tau}{2d} \sum_j (q_{j+1} - q_{j})^2 - \frac{1}{2}m\omega_0^2q_0^2$$
Then taking the Euler-Lagrange for q0 (and adding a damping term -bq0' since nonconservative forces cannot be derived from potentials):
$$\frac{\partial L}{\partial q_0} - \frac{d}{dt} \frac{\partial L}{\partial \dot{q_0}}=-m\omega_0^2q_0 - \tau (\frac{q_{0} - q_{-1}}{d}-\frac{q_{1} - q_{0}}{d})-m\ddot{q_0}-b\dot{q_0}=0$$
Then taking the limit as d->0, we have a continuous wave equation:
$$m\ddot{\psi_0}=-m\omega_0^2\psi_0 - \tau (\frac{\partial \psi_L}{\partial x}|_{x=0} - \frac{\partial \psi_R}{\partial x}|_{x=0})-m\ddot{\psi_0}-b\dot{\psi_0}$$
Where the psi's are determined by the traveling wave ansatz and boundary conditions.
Wavefunction from the left:
$$\psi_L(x,t)=A e^{i(\omega t - k x)} + B e^{i(\omega t + k x)}$$
Wavefunction to the right:
$$\psi_R(x,t)=C e^{i(\omega t - k x)}$$
Wavefunction at x=0:
$$\psi_0(t)≡\psi_R(0,t)=C e^{i\omega t}$$
With the boundary condition that psi is continuous at x = 0, we have:
$$C = A + B$$
Plugging these values into the wave equation, we can solve for C/A and B/A so that
$$T=\frac{|C|^2}{|A|^2}$$
$$R=\frac{|B|^2}{|A|^2}$$

3. The attempt at a solution
When I start solving for the ratios is where the really complicated expressions begin. According to the TA's notes, B/A should be:
$$\frac{B}{A}=\frac{-b \omega (2k\tau+b\omega)-m^2(\omega^2-\omega_0^2)^2-2ik\tau m(\omega^2-\omega_0^2)}{(2k\tau+b\omega)^2+m^2(\omega^2-\omega_0^2)^2}$$
So that
$$R=\frac{\frac{b^2\omega^2}{4k^2\tau^2}+\frac{m^2}{4k^2\tau^2}(\omega^2-\omega_0^2)^2}{(1+\frac{b\omega}{2k\tau})^2+\frac{m^2}{4k^2\tau^2}(\omega^2-\omega_0^2)^2}$$
While I was able to get the same expression for B/A, I got a different expression for R. I basically squared the real part and the imaginary part of the numerator and added them, and squared the denominator:
(My Attempt by Hand)
$$R=\frac{[-m^2(\omega^2-\omega_0^2)^2-b\omega(b\omega+2\tau k)]^2+4\tau^2k^2m^2(\omega^2-\omega_0^2)^2}{[m^2(\omega^2-\omega_0^2)^2+(b\omega+2\tau k)^2]^2}$$
This expression doesn't look like it can be reconciled to look like my TA's R.
However, when doing it on Mathematica, I get something that is equivalent to my TA's R:
(Result from using Mathematica)
$$R=1-\frac{4k\tau (k\tau + b\omega)}{4k^2 \tau^2 + 4bk\tau \omega + b^2\omega^2+m^2\omega^4+m^2\omega_0^2(-2\omega^2+\omega_0^2)}$$

Working with these complicated expressions is really time consuming, and I want to gain some insight on how TA's and Professors solve these problems. Is it just a matter of practice and knowing how the solution is going to turn out? Do I have to be proficient and making more calculations in my head? Are there tricks like substituting big expressions with variables? Should I start using technology more, rather than doing everything by hand on lined paper? Should I use blank white paper?

Last edited: Jun 9, 2015
2. Jun 9, 2015

### Simon Bridge

In a word: yes.

It is a matter of practice, and the resulting experience with other problems, so you know what sort of things to try - but you don't usually know how the solution will turn out when you start. It is very common to have to start a problem several times and it is uncommon that a problem will be solved in a few days or weeks (more like months and years).

You are in the process of training to solve problems nobody knows the answers to - what you want to pay attention to is not so much the specific techniques used to solve the problems we are able to solve now but how those techniques may make sense in terms of those problems so you can discover new methods to tackle problems that have not been discovered yet.

3. Jun 9, 2015

### theodoros.mihos

May I have wrong but I think you are asking the solution only for $\omega_0$.

4. Jun 9, 2015

### strangerep

I suspect the only thing you did wrong is that maybe you got intimidated by your complicated expression for $R$, thinking that it couldn't possibly match the desired answer? Sometimes you've just got to keep crunching these things through. (In this case, it's really just a case of expanding out, collecting terms carefully, and then looking for common factors.)

Certainly, use technology more if you can. But sometimes the tools are not quite right for the job, and/or they leave you puzzling about how the manipulation was achieved. So I like to do a computation manually if I can.

I know this can be hard...

I had similar crisis of confidence in myself some years ago when attempting QFT computations that are easily 10-100 times more difficult and complicated that what you've shown above. I simply couldn't carry a long computation through on paper without making a transcription error from one line to the next. I also couldn't reliably take shortcuts in my head -- occasionally I'd make a mistake and then be unable to spot it. It only takes one of these errors to ruin the whole thing. I got to the point of almost tearing my hair out because I'd keep making silly errors.

I solved this problem by NOT using pencil and paper anymore -- but rather doing all the computations on the screen in a latex document. I.e., type a line, copy and paste it to the next line, make changes, re-run latex, and so on. (Best on a large screen of course, so you can have the tex file and formatted output displayed side by side.)

Using latex in this way has 2 major benefits: one can easily copy large chunks without transcription errors, and there's less incentive to try a take shortcuts in my head (because it's easy to copy and do the step explicitly). Also, since every step is there, I can go back and check more easily.

Ever since adopting this practice, I can now carry out very long computations (many pages of very long line equations), and often get them right first time. And for the others, it's easier to go back and look for errors (both for myself, and for anyone else who checks the work).

HTH.

5. Jun 9, 2015

### Simon Bridge

This way of using LaTeX is what I ended up doing. Even then, sometimes need to set the paper for A3 landscape for long lines.
It also avoids the mislaid minus sign, bar, dot , or slashthrough.
We used to tell students, "remember to cross the h's and dot the x's."

6. Jun 9, 2015

### strangerep

Hah. Even A3 wouldn't be long enough for some of my monstrosities.
I was forced to learn some convenient macros for multi-line work.