Thursday, 28 April 2011

Simple differential equation I

Simple differential equations
An ordinary differential equation (or ODE) is a relation that contains functions of only one independent variable, and one or more of their derivatives with respect to that variable.
In some differential application problem we may not notice that we have used the techniques of differential equation, but actually we are solving it.

Example 1. The depth of water in a uniform bucket is 10 cm. If the rate of outflow is 5t/4 cm/min, find the time required for all water to flow out.
Set up dh/dt = -5t/4, h = ∫ (-5t/4) dt = -5h2/8 + C, C = 10.
By h = 10 – 5t2/4, we get t = 4 (min).

This is the very beginning form of differential equations: dy/dx = f(x).
The solution is simply = y = ∫f(x) dx = F(x) + C.

Now consider a harder general form: dy/dx = f(x)g(y)
By arranging terms we get dy/g(y) = f(x) dx
Integrate both sides: (Note that this action isn’t done respective to a certain variable. We simply put a integration sign on both sides like apply them in function. This is based on the uniqueness of ODE, but is not to be proofed here.)
∫ dy/g(y) = ∫ f(x) dx = F(x) + c.

Example 2. Solve the ODE  dA/dt = -10A
We have dt = -dA/10A, integrating both sides give t = -ln|A|/10 + c
But we have to solve A (not t), so ln|A| = -10(t-c), A=e-10(t-c)=Ce-10t .

Example 3. Solve (x2+1)cos y (dy/dx) + x sin y = 0 where y(2) = π/2
Rearrangement gives dy/dx = -x tan y / (x2+1)
dy / tan y = -x dx / (x2 +1)
Integrate gives ln(sin y) = -ln(x2+1)/2 +c
Simplification gives ln(x2+1)/2 + ln(sin y) = ln c’
(x2+1)sin2 y = c2
Put (x,y) = (2, π/2), (22+1)sin2π/2 = 5
Therefore (x2+1)sin2 y = 5

Example 4. Solve ln(dy/dx) = x+2y where y(0) = 0.
We have dy/dx = exe2y, e-2ydy = exdx, ex + e-2y/2 + c = 0
Put (x,y) = (0,0), c = -3/2 =>  e-2y = 3 - 2ex => y = -ln(3-2ex)/2.
For the general form dy/dx +Py = Q, we can’t simply integrate both sides. Instead, we multiply the integrating factor to both sides: IF = e∫P(x) dx.
(dy/dx + Py)(e∫P(x) dx) = Q(e∫P(x) dx)
d(ye∫P(x) dx)/dx = Q(e∫P(x) dx)
Then the variables are now separated.

Example 5. Consider the air friction model: dv/dt + vr = g, where r is a constant depending on the component of air.
Identifying IF = (e∫P(t) dt) = ert
ert(dv/dt + vr) = ertg
d(vert)/dt = gert
Integrate gives vert = gert/r + c, put (v,t) = (0,0) and arrange gives
v = (g – ge-rt)/r
This suits the physical observation.

Now let’s talk about some history:
Till today there’re still argument about who has been inventing calculus first, between Newton and Leibniz. Newton emphasizes Fluxional calculus which applies on area calculation by a earlier realization of Riemann Sum. Leibniz, in contrast, use the concept of infinitesimal calculus to calculate tangents.
In fact, the modern presentation of calculus, including the ∫ sign and dx dy, are created by Leibniz. Leibniz state dx as a infinitely small quantity and done his fundamental theory of calculus. In the other side, Newton avoid to use the small quantity variable, he uses x + o where o is a small quantity (but he thinks that adding up such small quantity would made mistake, which not any mistake should be neglected in a strict manner of pure mathematics.) His notation (differential as adding a dot above the variable) in only applied in physics field only. Leibniz’s notation was popular due to the convenience properties of dx, dy. If you state them as a quantity, you can easily understand why they can be cross-multiplied. Though we will not give a strict proof here.
1)       Solve dy/dx = 2y
2)       Solve dx/dy = 2xy.
3)       Solve dy/dx = 3x2 – 1.
4)       Solve sin x (dy/dx) + 2y cos x = cos x.
5)       Solve (dy/dx)2 = (x+1)/(x+2)2.
6)       Solve dy/dx = x(x2 – y) .
7)       Solve 1 + (x tan y – sec y)(dy/dx) = 0.

Tuesday, 26 April 2011



稍後會完成Physics另一個elective topic - 天文學……不過很多東西仍想好要怎樣以顯淺的語言語出。基本上AL level的有關題目已經整理好了,希望暑假有空做Problem Set.
由於2個electives以Study group形式進行,我希望能寫得比較詳細……也當成自學。
1) Electromagnetism
2) Atomic Physics (completed)
3) Atomic Physics problems
4) Astronophysics (10%)
5) Astronophysics problems
1) Organic Chemistry
- nomenclature
- isomerism
- reactions
- backward analysis
- lab procedure
2) Physical Chemistry
- Enthalpy and Entropy
1) AD-AS Model and fiscal Policy
2) Monetary topics
請建議。 orz
1) Usual techniques in calculus (?)

另外,overall #1也丟了~
正如你打ddk dkk kkk kkddk的時候就好像你聽到音樂的模進一樣,在每一個三連中漸漸將音樂推向高潮。
正如你打ddk d k ddk d k ddk dk dkkkkd k的時候所感覺到的輕快。
正所謂"You never win the cursed war",為#1而刷是沒有意義的,所以我決定了轉變角色……
Rokodo, March9th, wmfchris, suinagi, wmfchris again.
Now, it's kanopu's empire.

Thursday, 21 April 2011

Physics : Planetary Motion

Note: This note requires basic knowledge of calculus.
Planetary Motion
In planetary motion, the gravitational force is given by F = GMm/r2. By W = Fs,
dW/dr = d(Fs)/dr = d(Fr)/dr = F,   W = ∫F dr.
The gravitational potential energy (U) = ∫F dr = ∫ (GMm/r2) dr = -GMm/r + C.
Since we take the point of infinitely far as zero, so C = 0. Therefore U = -GMm/r
When r is near to Earth’s surface, work done to raise an object by height h (h<<R)is given by:
W = U’ – U = -GMm(1/(R+h) – 1/R) = GMmh/(R2+Rh) ≈ (GMm/R2)(mh) = mgh.
Therefore P.E. = mgh is a expression when it’s near to Earth’s surface.
Negative U implies that work have to be done to increase the distance between two object (then the EPE in the system of these two objects increases, i.e., less negative)
Equating mechanical energy (K.E. + E.P.E.), we say mvA2/2 - GMm/rA = mvB2/2 - GMm/rB.
Now consider circular orbital motion around a planet: GMm/r2 = mv2/2, v = (GM/r)0.5.
The mechanical energy of the orbiting object = E = mv2/2 – GMm/r = m(GM)/2r – GMm/r = U/2.
(Note: this is similar to the case of electron orbiting the nucleus. Also, this is applicable only when this is circular orbit.)
Escape velocity
We say an object is escaped from the affection by the gravity due to a mass when the mechanical energy of the object is positive, i.e., |K.E.|>|E.P.E.|, then at infinitely far it still has positive velocity (take the direction of g-field be negative). Mathematically mv2/2 ≥ GMm/r, then we have the minimum escaping velocity vesc = (2GM/R)0.5 = 20.5vorbiting.
Considering the escaping velocity and orbiting velocity, we know that:
a)       If vproj < (GM/r)0.5, the object performs projectile motion and falls to the ground.
b)       If vproj = (GM/r)0.5, the object performs circular orbiting around the mass.
c)       If (GM/r)0.5 < vproj < (2GM/r)0.5, the object performs elliptical orbiting around the mass.
d)       If vproj > (2GM/r)0.5, the object escape from the mass and never returns.
For Earth, the escaping velocity is approximately 11.2km s-1.
Elliptical orbit
Ellipse contains two foci. The sum of distance from a point on the ellipse to the two foci is the same for all point on the ellipse. For elliptical orbiting, the mass will be at one of the focus.
The point that is the farthest from the mass is called perihelion (for objects orbiting Earth, it’s called perigee) and the closest point is aphelion (apogee). The length of semi-major axis is given by major axis/2 or the (distance from perihelion + distance from aphelion)/2.
Kepler’s law of planetary motion
First law: The orbit of a planet about a star is an ellipse with the star at one focus.
Proof: if it’s not located at one of the focus, the planetary motion does not consistent with Newton’s law of motion. However it’s omitted here due to limited knowledge. 
Second law: A line joining a planet and its star sweeps out equal areas during equal intervals of time.
Proof: Consider the angular momentum : L = r × p = m(r × v), where × is the cross product.
Since v = dr/dt, L = m(r × dr/dt), dL/dt = m(dr/dt × dr/dt) = 0 (since parallel vector has zero cross product). Therefore L is a fixed value independent of its location in the orbit.
A = r2/2, dA = r dr/2 = (r × dr/dt) dt/2 = L(dt)/2m, therefore dA/dt = L/2m which is also fixed, independent of the location of the planar in the orbit.
Third law: The square of the orbiting period of an orbiting planet is directly proportional to the cube of the orbit's semi-major axis.
Proof: T = 2πr/v = 2πr(r/GM)0.5 = 2π(r3/GM)0.5, T2=4π2r3/GM, which shows that T2 is proportional to r3. For elliptical orbiting, r = semi-major axis (a).
Since another variable is M which is the mass of star, the proportion constant 4π2/GM is applicable to all planets which orbits the same mass (that is being orbited) only.
Apparent weightlessness
We feel weight because there’s normal reaction act by ground on ourselves. i.e., R = W + ma.
The acceleration refers to the relative acceleration between you and the ground. When the relative acceleration between you and the ground is zero, you feel no weight since there's no normal reaction acting on you. (But actually you are still massive. Note that the mass won’t change.)
Some relating phenomenon:
-          When the balance is drop with the object on the balance, the readings is zero since there’s no force (mg) acting on the balance hence R = 0. The weight itself accelerates the object.
-          When astronauts in spaceship orbits a planet, the astronauts himself feels no weight because the spaceship has the same acceleration with him, hence no normal reaction acting on him.

First note for the Astronomy elective topic. I start with some calculation, then introducing the universe system and history, lastly celestial model and hardcore astron. knowledge.

Monday, 18 April 2011

Variables and parametric equations

Recall that last time we switch the origin of reference corrdinate to make y = x^3 + x^2 into an even function, which is (y'+2/27) = (x'-1/3)^3 + (x'-1/3)^2 <=> y' = x'^3 - x'/3.

Now for a given random polynomial [with integer coefficient], is it possible to transform it into even/odd function?
The answer is: depends on the degree of the polyomial. It is possible for deg g =< 3, and more restriction [hence not "for all"] when the degree is larger than 3.

The proof is somehow like that:
1) The leading term decide that whether it's odd or even.
Proof: deg f = n, f = O(x^n).
(Do you remember the big O notation? f(x) = O(g(x))  implies that there exist reals a, k such that f(x)=< a(g(x)) for all x>= k.)

2)Under random polynomial, Substituting x -> (x+a) only eliminates one of the terms.
Proof: Consider the general form of real polynomial, if x is substituted by (x+a), then the new coefficient can be expressed in some binomial terms of the original ones. If one of the coefficient is sets to be zero, the a is unique. There does not exist a such that two of the cofficient disappears unless the original coefficient is specified.

For example, x^4 + 11x^3 + 45x^2 + 83x + 60 can be transformed into x^4 + ax^3 + bx by substituting x by x-3, while that's impossible for x^4 + 12x^3+45x^2+83x+60.

3) Consider the group relation of odd/even function:
odd*odd = even       (e.g. x (odd) * x^3 (odd) = x^4 (even)
proof: Let f(x) = -f(-x), g(x) = -g(-x)
f(x)g(x) = (-f(-x))(-g(-x)) = f(-x)g(-x)
even*even = even     (e.g. x^2 * x^4 = x^6)
odd*even = odd       (e.g. x^2 * x = x^3)
proof: Let f(x) = -f(-x), g(x) = g(-x)
f(-x)g(-x) = -f(x)g(x)
odd + odd = odd     (x^3 + x is still odd)
even + even = even

The difficulty is that : ODD + EVEN = ????

It's neither odd nor even.

4) When deg f =1,2,3 what you'll have to do is shift the origin to the symmetrical point. For linear functions, it's the y-intercept, for quadratic functions, it's the vertex, and for the cubic functions, it's the point of inflexion.

Ignore the constant term. there are 2 even and 2 odd terms in the polynomial, so it's impossible to eliminate both two terms.
For example: x^4 + 0.5x^2 + x
Though we see that the coefficient of x^3 is zero, but when we substitute a suitable k that the coefficient of x is zero, the coefficient of x^3 will be non-zero.

Though the coefficient elimination method is not useful here, it still get lots of application.

As many of you knows, eliminating the second leading term is almost a must in solving polynomials:
For x^n + a_(n-1) x^(n-1) +..., sub. x by (x-a_(n-1) / n) would eliminate that term by binomial theorem.
when it's eliminated, by fundamental theorem of algebra, we can assume that the polynomial is a product of a series of quadratic or linear factors. When one of the coefficient is zero that grealy reduces the difficulty in calculation.

e.g Simplify sin x + cos x.
sin x + 2cos x
= (sin x + cos x)
= (sin x + sin (x+pi/2))
= 2sin pi/4 sin x+pi/4
= rt2 sin (x+pi/4)

e.g. Show that cosh (x+1) +x^2 can't be rewritten into even function.
=(e^(x+1) + e^(-x-1))/2 + x^2
=(exp x + exp -x)/2e + (e-1/e)(exp x) + x^2
The first and third term is obviously even, but the middle term is asymmetrical. Since exp x > O(x^2), there's no way for writing the above equation.

e.g. Show that for positive real a,b,c, (a+b)^2 + (a+b+4c)^2 >= 100abc/(a+b+c). (HK team selection test)
What to do with variable elimination?
Divide both sides by c^2:
(a/c + b/c)^2 + (a/c + b/c + 4)^2 >= 100(a/c)(b/c)/(a/c + b/c + c/c)
(x+y)^2 + (x+y+4)^2 >= 100xy/(x+y+1)
(One interesting question here: can you see deg(LHS) = 2 > 1 = deg (RHS)? What's happening? Anything wrong?)
Use a stronger form:
(x+y)^2 (x+y+4)^2 >= 25(x+y)^2/(x+y+1)
z = x+y
(z+1)(z^2+(z+4)^2) -25z^2 >= 0 is trivially true.
Consider its [positive] zero is 4, so the equality stands at z = a/c+b/c = 4
a+b = 4c
By symmetrical reason a = b
So equality stands at a = b = 2c.

Parametic equation:
The euqation is written in forms of functions of t.
i.e., x = f(t), y=g(t)
When we have to transform it into x-y equation form, we write t = f^-1 (x) (If inverse function exist)
Then y = g(t) = g(f^-1(x)).
Example : x = t + 1, y = t + 3
Then t = x-1, y = t+3 = (x-1)+3 = x+2

Example : x = 2t, y = 1- t^2
y = 1-t^2 = 1 - (x/2) ^2
4y = 4-x^2

Example : x = sin t, y = cos t
Observe that sin ^2 t + cos ^2 t = 1
x^2 + y^2 = 1 (circle)
alternative method:
x = arcsin t
y = cos (arcsin x) = rt(1-x^2)
x^2 + y^2 = 1

Here's a question from Tokyo University Entrance Exam
Let P(1/2, 1/4) be a fixed point. Q(a,a^2) and R(b,b^2) is variable points which PQ=PR. Find locus of centroid of triangle PQR.
Equating PQ=PR, we get a^4+a^2/2-a = b^4 + b^2/2 - b.
Group the term:
2(a-b)(a+b)(a^2+b^2) + (a-b)(a+b) - 2(a-b)=0
since a =/= b,
(a+b)(2a^2+b^2+1) = 2
Let a^2 + b^2 = t, t>0
then a+b = 2/(2t+1)
x-value of centroid: (a+b+1/2)/3 = 1/6 + 2/(6t+3)
y-value of centroid: (a^2+b^2+1/4)/3 = 1/12 + t/3
Rewrite the parametric equations then we get x = 1/6 + 4/(36y+3).
But this is a parametric equations from t = a^2 + b^2 > 0, so t > 0
Moreover, the limit of the centroid is (1/2,1/4), so it starts from 1/2
Therefore we can conclude that the locus is x = 1/6 + 4/(36y+3) where 1/2 > x > 1/6

1) By subsituting a suitable variable, eliminate the functions/coefficient:
a) x^3 + 2x + 2, eliminate the constant term
b) x^4 + 3x^3 + 5x^2 +2x, eliminate the x^3 term
c) sin x + 2 cos x, simplify it into one function
Extended information: Hilbert's 13th challenge which states that "Solve all 7-th degree equations using continuous functions of two parameters.". It has been given a positive answer.
2) Is it possible to rewrite the positive part of Re(ln x + ln(ln x) + ln(ln(lnx))) into even functions?
3) Rewrite x = t^3 + 2t -1 , y = t^3 +2t^2 -1 into x-y form. Hence answer this question : "The x^3 term in both x and y can be eliminated each other. But why the resulting x-y form is still cubic?
4) Rewrite x = sin t, y = sin 3t in x-y form, sketch the resulting graph. Hence sketch the graph for x = cos t, y = sin 3t.
5) Show that the curve x = sin t, y = sin nt is enclosed if and only iff n is even non-zero integer. Hence, evaluate the length of curve (1 loop) in terms of n.
Extended information:  x = sin at, y = cos bt is a series of graph which is useful in physics too. Find the appliacble field and sketch the relavent graph.

Thursday, 14 April 2011

Atomic Physics : doc. ver notes

Links removed - check the above "Notes Corner" for my personal sites for the document.

Ch.1 - Atomic model
Ch.2 - Photoelectric effect
Ch.3 - Energy level
Ch.4 - Wave-particle duality
Ch.5 - Introductory nanotechnology

Original ver. -> notes of ch.1~4
MS equation ver. -> notes of ch. 1-4 where some long equations were rewritten by MS equations
Book ver. -> Full ver (ch. 1-5). My selection from some books, about 20 examples + 20 questions.

0)  This is for my classmates who want to study this elective topic ourselves.
1)  Please take the textbook as reference too. The exericses are importnat.
2)  This sets of notes including so many extra stuffs, and the examples and exercises are focused at the main component of the module.
3)  I will find some past paper (80-88AL) for Ch.1-4, but be prepared that it's VERY hard orz
4)  Please tell me if there's any problem with the content.

Monday, 4 April 2011

Equation involving multiple functions

Basic concept:
-Even function f(x) satisfies f(x) = f(-x)
-Odd function g(x) satisfies g(x) = -g(-x)
-degree of a polynomial (or a polynomial functions) depends on the degree of highest term in the function.

For simplicities, f(g(x)) is written as fg(x). (Different from f(x)g(x) = f(x) * g(x)), f(f(x)) is written as f_2(x).

Recell that if deg (fg(x)) = (deg f)(deg g), so mutiple linear functions is still linear.

Corollary 1: if f(x) is a linear function, then exist unique k for f_n(k) = k, where n is a natrual number.
The prove involves the techniques about geometric sequences:
Let f(x) = ax+b, f_n(x) = a^nx + a^(n-1)b + a^(n-2)b + ... + b
= a^n x + b(1+a+a^2+...+a^(n-1)) = x
b(1-a^n)/(1-a) = x(1-a^n)
x = b/(1-a), which is independent of n, so the root is unique.

Now consider two linear functions. f(x) = ax+b, g(x) = cx+d.
Does gfgfgf(x) = x and gfgfgfgf(x) = x gives the same root?
Method 1: Expanding (<- n "gf") = a^n c^n x + a^(n-1) c^n b + a^(n-1) c^(n-1) d +...+cb+d
= a^n c^n x + (cb+d)(1+ac+a^2c^2+...+a^(n-1)c^(n-1))
= a^n c^n x + (cb+d)(1-a^n c^n)/(1-ac) = x
x = (cb+d)/(1-ac) which is also independent of n, so it's also unique.

You may found that  the proofs are quite similar, so are there a quicker method?

Method 2:  Since they're both linear, by deg (fg(x)) = (deg f)(deg g), gf(x) is also linear. = (gf)_n (x) = h_n(x) = x, where h(x) identically equal to gf(x), and is linear.
By corollary 1, this is true.

Now I'm going to introduce a graphical idea to solve such equation.

Theorem : Given f(x) and g(x). In order to solve f(g(x)) = 0 on the graph, draw the curve x = f(y) and y = g(x). Project the y-intercept of f to a horizontal line. The x value of intecepts between projected horizontal line and y = g(x) is the (real) root of the equation.

We can do the above method by algraical way:
solve f(x) = 0 and get the set of roots {a_i}, then solve the set of equations g(x) = a_i, all roots of it are answers.

Now check out corollary by the above method:
Root of ax+b=x <=> (a-1)x+b=0
The graph of y = (a-1)x+b is simply a stright line with y-intercept b, x-intercept (root) b/(1-a), and dy/dx = 1-a.
Now for a(ax+b)+b = b, we transform it into a((a-1/a)x+b)+b = 0
So g (x) = (a-1/a)x+b, f(x) = ax+b.
The graph y = g(x) is simple, with x-intercept b and dy/dx = a. How about x = f(y)?
Rotate the graph about 90 degrees and draw the graph, it has x-intercept b, and dx/dy = a, then dy/dx = 1/a.
Apply the above result and we can show that they have the same root.

Example : f, g are quadratic functions. Given that f(g(x)) = 0 gives 4 real roots, 1,3,4,p respectively. Find maximum possible p. (PC11, F5 final, #15)

Consider the above picture (ignore the numerical values), we've applied the above method, and we find that the roots are symmetrical about the symmetrical axis of f(x). So maxima occurs when 3 is symmetrical to 4, then 1 is symmetrical to 6 (which is the answer).

For higher degrees we can also apply the technique of shiting coordinate to make equations simplier. One of the example is adding odd and even functions up. You will find that the sum is neither odd nor even, but we are able to change it into odd functions.

Example: y = x^3 + x^2
The resulting polynomial has local maxima and minima 4/27 and 0 respectively, so we know that the points of infextion occurs at (-1/3, 2/27). And the graph is rotational symmetrical about that point, so it would be odd function if the function takes (-1/3, 2/27) as origin.
Take the origin with new coordinate x' and y', parallel with x and y axis respectively.
The new equation becomes (y'+2/27) = (x'-1/3)^3 + (x'-1/3)^2
Expanding gives y = x^3 - x/3, which is the sum of odd functions, so we are done.

Example: Can we turn y = x^2(1+cos x) + x into odd or even functions?
No. Since it's positve when x is big enough, we can't turn it into odd functions. Also compare the x-distance of the three local minima which gives different distance, so it's impossible to turn it into even functions too.

1) Consider the taylor expansion, determine whether the trigonometric functions are odd/even/neither odd nor even.
2) Define f_-1(x) as the inverse function of f, f_-2(x) = f_-1(f_-1(x)), etc. then for negative integer, does corollary 1 still valid?
3) Proof the basic assumption of the "shifting coordinate of cubic functions": The points of infletion occurs at the mid-point of local maxima and minima.
4) Given f(x) = x^3 + 6x^2 + 11x + 6. By choosing a suitable new origin, express the given equation in terms of equation concerning the new coordinates.
5) Given deg f = 2, deg g = 3, the equation f(g(x)) = 0 gives 5 real roots, 1,3,8,9,p respectively. Find all posssible value of p.
You can take the technique in pure maths about "rotating coordinate" as reference, and use a suitable shift of coordinates and change the follow equations into odd or even functions.
6) y^3 +x^3 = 3xy (Higher Maths Q4, 1981)
7) y = sin^2 x + x
8) Can we turn y = e^x - x^7 into even functions? You may consider the taylor expansions of e^x.