How can I write complex equations using Reverse Polish notation?

  • Thread starter Thread starter Synetos
  • Start date Start date
  • Tags Tags
    Notation Reverse
Synetos
Messages
37
Reaction score
1
So I need some help with RPN, I checked the wiki page but I still don't quite get it. Like I get simple multiplications, aditions etc. But how would you for example write:
}^{2}%20\sqrt{%20(\frac{dx}{dt})^{2}%20+%20(\frac{dy}{dt})^{2}%20+%20(\frac{dz}{dt})^{2}%20%20}}.png
 
Last edited:
Mathematics news on Phys.org
Synetos said:
So I need some help with RPN, I checked the wiki page but I still don't quite get it. Like I get simple multiplications, aditions etc. But how would you for example write:
}^{2}%20\sqrt{%20(\frac{dx}{dt})^{2}%20+%20(\frac{dy}{dt})^{2}%20+%20(\frac{dz}{dt})^{2}%20%20}}.png

Let me simplify things a bit, using x', y', and z' for values the derivatives, so that x' means the value of dx/dt at some specific t. Same for y' and z'.

To get the value of the radical you could do this:
x' Enter X2 y' Enter X2 + z' Enter X2 + Sqrt

I'm thinking in terms of how you would evaluate a similar expression on an RPN calculator, such as the HP 48.

In the expression above X2 is the operation that pops the value at the top of the stack, squares it, and stores the squared value at the top of the stack.
Enter is the operation that stores the value preceding it on the stack.
+ is the operation that pops the top two values on the stack, adds them, and stores their sum at the top of the stack.
Sqrt pops the top of the stack, takes the square root of it, and stores that value on the stack top.
 
Synetos said:
So I need some help with RPN, I checked the wiki page but I still don't quite get it. Like I get simple multiplications, aditions etc. But how would you for example write:
}^{2}%20\sqrt{%20(\frac{dx}{dt})^{2}%20+%20(\frac{dy}{dt})^{2}%20+%20(\frac{dz}{dt})^{2}%20%20}}.png

It's the way you'd do it in your head if you didn't want to remember too many intermediate results. There are different things you might want to use as operators, I made it simple with d/dt and integrate. You might instead have a d?/d? operator which takes two parameters, the function and the variable to differentiate with respect to.

Find x
Apply d/dt to it
Square it
Find y
Apply d/dt to it
Square it
Add the results of those two squarings
Find z
Apply d/dt to it
Square it
Add the result of the previous sum to this last result
Square root it
Integrate it

Rewritten in one line it becomes
x d/dt 2 y d/dt 2 + z d/dt 2 + SqRoot Integrate

To interpret that it might be clearer with brackets. Each operator applies to the "thing" immediately before it. Or two things in case of the + operator.
( < [ ((x d/dt)2) ((y d/dt)2) + ] [ (z d/dt)2 ] + >SqRoot )Integrate
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top