The momentum of light
Well, everyone of us probably heard in high school (or earlier) that the photon has it’s own momentum.
And I think that more then a half of us kept wondering then about it. Namely, without deep knowledge of Physics, such statements like “light have no rest mass”, or “light is an electromagnetic wave, but it has a momentum” can be confusing, and as Richard Feynman once said - it’s an awful feeling
Here I want to explain shortly the mechanism of passing the momentum by a photon through classic physics.

Firstly, light is an electromagnetic wave which as the names says is composed from magnetic and electric field. Those two fields are perpendicular to each other and to the direction in which the wave propagates. What makes them propagate? Here my answer can be given only by those two equations:
Those equations mean that whenever there exists a circulation of electric field there should be created a changeable magnetic field and vice versa.
Using Maxwell equations and some mathematics we can derive the following equation wchich gives us the direct relationship between the electric and the magnetic field!
Now lets assume that an electric field is vertically positioned in space and the magnetic field horizontally. What happens when an electromagnetic wave passes an electron? The electric field of the electromagnetic wave makes it swing back and forth in the vertical direction what leads the electron to create a new electromagnetic wave in every perpendicular direction to it’s movement. That’s *exactly how the reflection of the light works!
Hold on, but what does the magnetic field of the electromagnetic wave to the electron? Well, I suppose that everyone remember the famous Lorentz Force .The Lorentz force keeps affecting the electron only when it’s in movement, and it is when the electric field affects it. Both fields work then together, but in what direction affects the Lorentz force? In the direction of light propagation. Though when light go over an charged object, which starts to move in the reaction of the affecting field, then a pushing force happens in the direction in which light propagates!
That forced is called the pressure of radiation now, we’ll derive the amount of that pressure. The force equals of course , but because everything moves, the
is an average of force
. Moreover
and the speed
is also taken an avarage, so we have
… but wait a minute!
and
and now we can write
What’s more, from school we know that light keeps with itself energy
This leads us to the ultimate result
where
is known as wave wavenumber.
Even though we finished, there’s a tousend more things to explore, for example we can find out that and
create a four-vector like the energy and the momentum in special relativity, but it’s a whole new topic…
I hope you enjoied my article, feel free to ask if anything’s unclear. I will try to help you as much as I can.
Filed under: Physics | 1 Comment
Tags: mass, momentum, photon, Physics
The evolution of Python
It’s really inspiring ![]()
Filed under: Inspiration, Programming, Python | 0 Comments
Tags: develop, evolution, guido, Programming, Python
Here I’m posting the source code written in Python for the Google Code Jam Practice Problems.
The tasks is available after logging at google - in: http://code.google.com/codejam/contest/ in Practice Problems link.
I don’t consider this code to be optimal or the quickest, so I’m open for your suggestions and remarks, what could have been done better
from math import pow
print "enter the filename: "
pliczek = str(raw_input())
pierwsza=1
f=open(pliczek, 'r' )
g=open("result " + pliczek, 'w' )
for data in f:
if (pierwsza==1):
pierwsza=0
ile = 1
else:
data = data.split(' ' )
base0 = len(str(data[1]))
base1 = len(str(data[2].strip()))
dlugosc = len(str(data[0]))
liczba = 0
for i in str(data[0]):
liczba += data[1].index(i) * pow(base0,dlugosc - 1)
dlugosc-=1
liczba = int(liczba)
nowaliczba = ""
while liczba>0:
nowaliczba = str(data[2].strip())[liczba%base1] + nowaliczba
liczba = liczba/base1
g.write('Case #'+str(ile) + ': '+nowaliczba + '\n' )
ile+=1
f.close()
g.close()
by the way, I noticed some little bug in WordPress - it’s changing “‘)” to a smiley even when it’s written as a source code
Filed under: Informatics, Programming, Python | 5 Comments
Tags: algorith, code, google, jam, Python
The angle which arms contain chords or tangents of a circle is the half of the sum (if the verticle of the angle lies inside the circle or on it) or difference (if the verticle lies outside) of middle angles based on the curves, which set this angle.
The proof can be illustrated by following pictures which consider all the possibilities.
Filed under: Mathematics | 0 Comments
Tags: math, tangent, circle, angles, angle, arm, chord
Filed under: Journal, Life, Personal, Philosophy | Enter your password to view comments
Tags: Personal, philisophy
pyAsk 2 beta 4 released!
Today I’ve released pyAsk 2 in beta 4 (I’ve quickly found some bugs in previous betas). The software was created with an intention to bring educational software to mobile phones and it was written using only a mobile phone (n95 8gb) with external keyboard (SU-8W) during bus rides to school :).
PyAsk is now an open source app written in Python for s60 which asks you from predefinied words and allows you to create ones and own dicts on the way to school or university.
In the second version I’ve added:
- sis installer
- ‘both-side-asking’
- option to add many synonyms added my commas (like: sysnonym1, synonym2,… synonymN)
- small improvements as the number of synonyms (x) and the number of current question (#x/y) in the query window
Here the project’s homesite: http://code.google.com/p/pyask/
Here are a few screenshots:
ow, I almost forgot I’d like to thank everybody which helped in pyAsk development or beta testing, and exclusivly there are: Łukasz Jezusek, Ecik & Alfred Niewiem who helped
Filed under: Mobile, Nokia N95 8GB, Programming, Python, pys60 | 1 Comment
Tags: education, Mobile, Programming, pyask, pys60, Python, s60, words

So you want to code on your phone, huh?
indispensable tools which you’ll need depend on what phone you have.
Here I will show you what do you need to install if you have a s60v3 nokia phone with at least 64mb of RAM, like N95, N95 8GB or E90. If you don’t know how to code in Python -look here for PHP tutorial - look here
Hardware:
- s60v3 phone with at least 64mb of RAM (that amount of ram is needed to run PAMP)
- SU-8W keyboard (without it you’ll run out of thumbs)
Software for developing Python apps:
- Python For S60 1.4.2 or never (first install PythonForS60_1_4_2_3rdEd.SIS and then PythonScriptShell_1_4_2_3rdEd.SIS, documentation file can be found there also)
- PED - a text and python script editor for s60 (to input code comfortably, moreover if’ll ever feel a need, you can edit it)
- view and add it to bookmarks: http://wiki.opensource.nokia.com/projects/PyS60_applications
some nice apps and modules can be found there
Software for developing PHP apps:
Known Issues on PAMP:
- I wasn’t able to connect any mysql database with PAMP, so probably the only thing that’s left is to save all data in normal files.
- Zend Framework doesn’t seem to work on PAMP.
Some apps written in Python:
- ASPY Player - Music player for Symbian S60 devices with Last.fm scrobbling built-in (by Douglas Fernando da Silva)
- PyAsk - App asking from predefined words (by Me)
offtop:
Sometimes I think to myself that I don’t really need a laptop as long as I don’t do much graphic.
Nokia N95 8GB have enourmous possibilities and I wouldn’t change it for e90, since SU-8W is a lot more comfortable keyboard.
Filed under: Informatics, Mobile, Nokia N95, Nokia N95 8GB, Programming, Python, Science, pys60 | 1 Comment
Tags: code, Mobile, n95 8gb, php, Programming, pyask, Python
Analogies among activities #1

I’ve found an interesting analogy between going to sleep and developing relationships between man and woman.
- During the evening hours you feel sleepy.
When you get mature, you feel a need to find a partner - Moreover in case of some circumstances we may want to sleep during the day, but it’s rather rare.
It’s rare for children to become involved with somebody. - On the other hand extremely tired people can sleep during standing
Lonely people on the end often give up quality choices. - Sometimes we eat something or drink that does not let us sleep, for example coffee.
Sometimes people practice things that temporarily satisfy their needs for relationships, like masturbation or viewing pornography, watching films. - While having insomnia people turn around in their beds, searching for a cold place, but whenever their find it, it turns warm and they still can’t sleep
People dominated by media promoting perfection often find people boring and whenever their find one, they feel disappointed with his flaws and lack of perfection. - Very often when when we think to much about how much we want to fall asleep we can’t actually do it.
When we are trying to hard in seeking for a partner we often encounter failures. - If we are wearing on us to much closes it’s rather difficult to fell asleep in opposite of wearing a pyjama or sleeping naked.
When we are being reserved or withdrawn we encounter problems in finding a partner
As you can see there are many similarities in those two things…
So can I conclude, that human should be polygamous, since he sleeps hundreds of times in his life? Or should they be treated as constant attempts for eternal dream?
Filed under: Philosophy | 1 Comment
Josephus Problem
Problem: If you’ll eliminate every second person from the circle of people going clockwise, which one stays alive? (As first the second person dies)
Aswer: if then the person with number
stays alive. Equivalently it’s a one-bit-shift-left of number
written binary
I will not write here the whole solution, thus it can be found in a great book “Concrete Mathematics. A foundation for Computer Science”
Filed under: Mathematics, Problems | 0 Comments
Tags: flawiusz, josephus, probleme
GTalk with emoticons and avatars
Here you can find my own simple theme for Google Talk.
Description:
It’s a new theme with working emoticons on Gtalk, just have to remember to do a space before a emoticon.
Instalation:
1. Extract the archieve to your X:\Documents and Settings\user\Local Settings\Application Data\Google\Google Talk\themes\system\chat\ directory, where X is your system drive letter and user is your username
2. Set theme in Gtalk settings: Settings-> Appearance ->ClassicPictureWithEmoticons and hit OK
Filed under: Informatics, Science | 1 Comment
Tags: chat, customize, emoticons, google, gtalk, talk
Number Theory NO.1
Prove that for every natural number there exists
different natural numbers such as sum of any two is divisable by their diffrence.
Proof:
Because number is divisable by
, we can write
and of course
. Adding those two together:
Induction:
1. Sequence 1,2 works
2. Assume that sequence works, then the number
is divisable by the difference of any two numbers from the sequence
3. Let , then a sequence, including
numbers:
‘Works’.
Filed under: Mathematics | 0 Comments
Tags: math, natural, number theory, numbers
Some exercise with x+y+z=0
A few days ago I were stuck with one exercise which I can’t pushed off :] Meanwhile when I forgotten about it, friend of mine, Ecik, did it. It’s below with his solution.
Prove the following:
if
Solution:
I’m open on any suggestions or other solutions of yours.
If you’d like to see Ecik’s blog, here it is http://braindarkside.wordpress.com/
Filed under: Exercises, Identity, Mathematics | 0 Comments
Tags: ecik, math, x+y+z=0, zero
Square root “sequence” of 2
Reading some of the Lev Kourliandtchik books, I’ve found, kindy tricky observation how to write extreamly simple, this giant
with number of square roots.
It’s easy to dubunk that
and using that equality we have
cool, huh? ![]()
Filed under: Mathematics, Science | 4 Comments
Tags: 2, cos, cosinus, form, roots, sequence, short, square
For , we do have
Filed under: Identity, Mathematics, Science | 0 Comments
Tags: Identity, tangent, triangle, trigonometry
Image Method in Physics
Suppose that we have a grounded sphere made from a conductor and an electron far from the sphere. Let the radius of the sphere be and the beginning speed of the electron be
orientated on the line in distance of
from the center of the sphere. The smallest distance between electron and the center of the sphere is
Calculate supposing to have everything else.
Filed under: Physics, Science | 0 Comments
Reading R. Resnick - D. Haliday thermodynamics, I’ve found something well known me although it’s making me wonder every single time when I think about it. It’s the derivation of the thermodynamics law that goes like this:
From first law of thermodynamics , but in the adiabatic process we have
and instead of
we put
And this is the moment that I do not understand! Why, to hell do we put
instead of
if both of the variables DO CHANGE in time?! Even if it’s in diffrential, it should be that second one.
If someone knows the reasons why it goes like that, please comment this post and explain it to me.
Futher we get because
, and from it
On the other hand from the perfect gas equatation brought to the diffrental form we get
After comparing those two expressions for
, remembering that
and
and some simple algebraic transformation, we recieve
Integrating gives us finnaly , hence
Filed under: Physics, Science | 0 Comments
Tags: adiabatic, physic, process, thermodynamic
The solutions can be found here http://www.om.edu.pl/zadania/om/om59_1r.pdf
My solution for task number 9 is here: Solution for number 9
Filed under: Journal, Mathematics | 0 Comments
Tags: answers, math, polish, solution
Upseting method again
Lets calculate more compilated sum
further, the last one equals to
and now the first of the sums is equal to
however the second one is easy, cause its a geometric sequence equal to
under the law from previous post. Now we have
, in the result of elementary algebraic transformation we recieve
It’s easy to notice that we could put everything in the place of 2, so let there be x. Then
And now we have quite general law ![]()
Filed under: Mathematics | 0 Comments
Tags: math, sequence, sum, upset, upseting
Asume that we want to calculate
Of course,
But the sum on the right side is equal to Therefore
and so,
Filed under: Mathematics | 0 Comments
Tags: geometric, math, sequence, sum








