Work, Energy and Power

Work done

Work done by a force is the product of the forces and the distance moved in the direction of the force.
SI unit: joule (J) – the SI unit of energy.
1 J = 1 N m

\begin{aligned} W=F\times s \end{aligned}

Work done must be calculated by using the component of the force that is parallel to the direction of the displacement. If the two directions are the same, work is done on the object and the objects gains energy. If the two directions are opposite, then energy is lost through work done(typically as friction or air resistance)

Work done must be calculated by using the component of the force that is parallel to the direction of the displacement.
If the two directions are the same, work is done on the object and the objects gains energy.
If the two directions are opposite, then energy is lost through work done(typically as friction or air resistance)

Work done by a gas

work on gas

Work done by a gas equals to the pressure it exerts over the cross-sectional area and the displacement the piston moves.

\begin{aligned} F&=p\times A\\W&=p\times A\times s\\&=p\times \Delta V \end{aligned}

Gravitational potential energy

Work is done by you during lifting. Object gains height when work is done against gravity. Gravitational potential energy increases as an object moves to a higher ground.

gpe

Other forms of potential energy

There are many forms of potential energy. Some examples are below:

  1. Electrical potential energy – capacitor. A capacitor stores charge which provides the capacitor the ability to produce current. A battery does not store electrical potential energy. Instead, it is stored as chemical energy.
  2. Elastic potential energy – spring
  3. Chemical potential energy – food, battery. Usually, chemical energy allows the substance to burn for a period of time, such as most organic compounds.
  4. Nuclear energy – radioactive nuclei

Kinetic energy

Kinetic energy is the energy due to motion. A moving object contains kinetic energy. To derive the equation of kinetic energy, we first assume an object is at rest. A constant force does work on the object, causing it to accelerate.

\begin{aligned} v^2&=u^2+2as\\&=2as \text{ since the object is initially at rest} \end{aligned}

Multiplying \frac{1}{2}m on both sides,

\begin{aligned} \frac{1}{2}mv^2&=mas\\&=Fs \end{aligned}

Hence, work done is converted into kinetic energy of \frac{1}{2}mv^2 .

Gravitational PE and Kinetic energy Transformation

When a high object falls to a lower height, the GPE is converted to KE. The increase in KE cause the object to increase in speed. The decrease in height should always be calculated based on the drop in vertical height.

Efficiency

Efficiency is the ratio of the useful output energy to the total input energy expressed as a percentage.

\begin{aligned} \text{efficiency}=\frac{\text{useful output energy}}{\text{total input energy}} \times 100\% \end{aligned}

It is important for you to determine what makes the useful output energy in an energy transformation situation. Below are some situations of energy transformations. Suggest the useful output energy and the energy/energies that are lost.

  1. A luggage being delivered from the ground floor to the first floor.
  2. A man turning a generator to produce electricity.
  3. Water flowing through a hydroelectric damp.
  4. Wind flowing through a windmill.

Coulomb’s Law

Coulomb’s force is the electrical force between two charges. Since there are positive and negative charges, coulomb’s force can be attractive or repulsive. However, the magnitude of the force produced by a point charge is similar to gravitational force:

\begin{aligned} F=\pm \frac{1}{4\pi \epsilon _0} \frac{Q_1Q_2}{r^2} \end{aligned}

\epsilon_o is the permittivity of free space. It is a description of how well electric field lines permeates in vacuum. It has a value of 8.85\times 10^{-12} \text{m}^{-3}\text{ kg}^{-1}\text{s}^4\text{A}^2

Electric Field

An electric field is a region which a charge experiences an electrical force.

Similar to gravitational field strength, the electric field strength at a point is the coulomb force per unit charge placed at that point.

\begin{aligned} E=\pm \frac{1}{4\pi \epsilon _0}\frac{Q}{r^2} \end{aligned}

Properties of electric field

  • Field lines are represented by arrows, starting from positive and ends at the negative.
  • Field lines do not cross.
  • Field lines always emerge or enters a conducting surface(s.g. metal) at a perpendicular direction.
  • There are no electric field in a conductor.

The direction of the field line represents the direction of electric force acting on a positive charge when it is placed in the field. As such, the direction of electric force on a negative charge is opposite to the direction of the field lines.

Challenge 1

Can you suggest why the electric field lines emerging or entering a conducting surface is perpendicular?

Electric Potential

Electric potential of a point is the amount of work done in bringing a unit charge from infinity to that point.

Similar to gravitational potential,

\begin{aligned} \phi=\pm \frac{1}{4 \pi \epsilon_o}\frac{Q}{r} \end{aligned}

The electric potential energy is the amount of work done in bring a charge from infinity to that point.

The difference between electric potential and potential energy is that for electric potential, it is the energy per unit charge while in potential energy, we are considering the entire charge, which may be more than 1 coulomb.

Relationship between electric field and potential

It is important to remember that the field strength is the negative of the potential gradient. Potential gradient means that gradient of the potential-distance graph.

The negative gradient of this graph gives the value of the electric field strength.

The negative gradient of this graph gives the value of the electric field strength.

Uniform Electric Field

A uniform electric field can be produced by a pair of parallel plates. A charge placed anywhere inside a uniform field experiences the same force, regardless of whether it is nearer to the positive or negative plate.

You can think that a positive charge, if placed near the negative plate, experience more attraction by the negative plate and less repulsion by the positive plate. The same charge placed near the positive plate experiences more repulsion from the positive plate and less attraction by the negative plate. Hence the charge experiences the same force anywhere in this uniform field.

Energy of a Simple Harmonic Oscillator

Energy changes in according to displacement

The kinetic energy of a simple harmonic oscillator is

\begin{aligned} E_\text{kinetic} &= \frac{1}{2}m \omega^2(x_o^2 - x^2) \end{aligned}

In a SHM, the oscillator’s kinetic energy and potential energy always changes from maximum to zero throughout the oscillations. However, at all time, the total energy of the oscillator is constant. This value can be obtained by calculating the maximum kinetic energy of the system:

\begin{aligned} E_\text{total} &= \frac{1}{2}mv_o ^2\\&=\frac{1}{2}m \omega^2 x_o^2 \end{aligned}

To find out the potential energy of a simple harmonic oscillator,

\begin{aligned} E_\text{potential} &= E_\text{total} - E_\text{kinetic}\\&=\frac{1}{2}m \omega^2x_o^2 - \frac{1}{2}m \omega^2(x_o^2 - x^2)\\&=\frac{1}{2}m\omega^2 x^2\end{aligned}

The total energy is constant, but the kinetic and potential energy changes throughout the oscillator.

The total energy is constant, but the kinetic and potential energy changes throughout the oscillator.

The energy changes of an SHM oscillator changes in a sinusoidal pattern.

Energy changes according to time

From the velocity equation, the kinetic energy is

\begin{aligned} E_\text{kinetic}&=\frac{1}{2}mv^2\\&=\frac{1}{2}mv_o ^2 \cos^2{\omega t}\end{aligned}

The potential energy is the difference between the total energy and the kinetic energy,

\begin{aligned} E_\text{potential}&=\frac{1}{2}mv_o ^2 - \frac{1}{2}mv_o ^2 \cos^2{\omega t}\\&=\frac{1}{2}mv_o^2(1-\cos^2{\omega t})\\&=\frac{1}{2}mv_o \sin^2{\omega t} \end{aligned}

Uniform Gravitational Force

 

Uniform gravitational force

The gravitational force acting on a mass is called weight. Weight always acts vertically down and its magnitude is directly proportional to the mass.

\begin{aligned} W=mg \end{aligned}

where g is the gravitational field strength on the Earth’s surface. Gravitational field strength of a point is the gravitational force acting on a unit mass at that point.

\begin{aligned} g=\frac{F}{m} \end{aligned}

The SI unit of gravitational field strength is \text{N kg}^{-1} .

On the Earth’s surface, the gravitational field is uniform and its direction is vertically down. A uniform field is represented by parallel field lines. A mass placed anywhere in a uniform field experiences the same gravitational force.

The gravitational field on Earth's surface is pointing vertically down

The gravitational field on Earth’s surface is pointing vertically down

The direction of the gravitational field indicates the direction of the force acting on a mass placed in the field.

When a mass is thrown vertically upward, its initial velocity is v. At its maximum height, its velocity is 0\text{ m s}^{-1}. It then falls and its velocity reaches v in the downward direction.

forces

Challenge 1

What are the values of acceleration at point A, B and C?

Centripetal acceleration

For an object moving in a uniform circular motion, the centripetal acceleration is

\begin{aligned} a=\frac{v^2}{r} \end{aligned}

Since v=r\omega ,

\begin{aligned} a&=\frac{r^2\omega ^2}{r} \\ &=r\omega ^2\end{aligned}

It is important to note that this centripetal acceleration is not angular acceleration. Angular acceleration is used in a rotational body while what we are doing here involves an object moving in a circle.

A body of mass m would experience a force of \begin{aligned} \frac{mv^2}{r} \end{aligned}

Earth’s gravitational acceleration

An object moving in a circular motion around Earth experiences a centripetal force. Since this force equals to the weight,

\begin{aligned} mg&=\frac{mv^2}{r}\\ g &= \frac{v^2}{r}\end{aligned}

We can see that the velocity of an object moving around Earth depends only on its distance from the Earth’s centre(radius).

Configure SFTP using ForkLift to InMotionHosting Reseller Account

In this post, I am going to list the steps required to set up SFTP connection to InMotionHosting Reseller account. I am using a Mac with ForkLift. If you are using Windows, a different FTP client or a different Hosting provider, some instructions may be different. These steps are also applicable to the InMotionHosting Shared accounts.

Enabling SSH on the cPanel account

By default, SSH is not active on a reseller account. To enable it, you need to login to the WHM account. If you have a Shared account, you will need to contact your hosting provider to request for SSH access.

  1. Account Functions > Modify an account
  2. Select the account that you want to enable SSH. Check on the Shell Access and click Save.

Generate the public and private keys

  1. Login to the cPanel of the account that you want to have SFTP connection. Click SSH Shell Access.
  2. Click Manage SSH Keys.
  3. Click Generate a New Key.
  4. InMotionHosting allows dsa Key Type with Key Size of 1024. Other hosting provider may allow rsa that allows up to 4096 Key Size.
  5. Enter a strong password for the Key Password. You need this key password for subsequent connection, so it is advisable to record this password somewhere on your computer.
  6. Click Generate Key.
  7. One Public and one Private key is generated. Click Manage Authorization to authorize this public key.
  8. Click View or Download for the Private Keys to download it to your computer. If you are using Mac, click the Download Key. If you are using Windows(Putty), enter a passphrase to unlock the private key and click Convert. Windows users would download the ppk format private key.

SFTP_img1

You now have the private key that would be used to connect to the server with SFTP.

Configure the SFTP Client Software

I am using ForkLift for file transfer. If you are using a different software, the instructions may differs slightly, but the general idea is the same.

SFTP_img3

  1. With ForkLift, connect to your server.
  2. Select the following options:
    1. Protocol: SFTP
    2. Server: your domain e.g. example.com
    3. Username: your user name that you used to log in to the cPanel.
    4. Leave the Password blank and click on the key icon to upload your private key.
    5. For InMotionHosting Reseller and Shared accounts, enter 2222 for the Port. If you are using a different Hosting provider, this Port number may be different. If you are using InMotionHosting VPS or Dedicated Servers, the Port number would be 22.
    6. You will be prompted for the private key password. Enter it and your connection would be successful.

Conclusion

Setting up SFTP took me many trials and errors due to the little information on the net on configuring an FTP client to handle SFTP connection. Most SFTP resources discuss connecting SFTP with SSH inside Terminal. I hope this article would be useful for web developers to use a client to connect with SFTP as it is convenient to use a client than cPanel to transfer files during development and maintenance. Some of the common third party FTP clients for Mac are:

 

The Physics of Simple Harmonic Motion

An object moving in an SHM must obey the relation

\begin{aligned} a=-\omega ^2 x\end{aligned}

where x is the displacement and \omega is the angular frequency of the oscillator. \omega  is related to the frequency f of the oscillator by the relation \begin{aligned} w=2\pi f \end{aligned} .

A body is moving in SHM if its acceleration is directly proportional to the displacement and in the opposite direction to the displacement.

In this equation, we observe the following:

  • the acceleration of the oscillator is always opposite to the displacement,
  • the magnitude of the acceleration is directly proportional to the displacement.

From these two points, we see that the acceleration is greatest when the oscillator is at the maximum displacement while it is zero when the oscillator is at equilibrium. Since force and acceleration is directly proportional F=ma , we see that the restoring force of the oscillator is correspondingly largest at the maximum displacement and zero at equilibrium.

SHM in a spring

When a object hung on a spring oscillates, it is moving in SHM. There is a restoring force from the spring causing the object to move up and down. There are two ways to start the motion:

  1. displace the object to a certain distance and release, or
  2. with the oscillator at equilibrium, give it a push such that it starts moving.

Which colour of the graphs would case 1 and 2 belong?

SHM

The red graph would have an equation of \begin{aligned} x=x_0 \sin\omega t \end{aligned} while the blue graph is \begin{aligned} x=x_0 \cos \omega t \end{aligned}.

For the rest of this post, I will use the first equation (red), \begin{aligned} x = x_0 \sin \omega t \end{aligned}.

Since velocity is the derivative of displacement with time,

\begin{aligned} v=\frac{dx}{dt}=x_0 \omega \cos \omega t  \end{aligned}

Acceleration is the derivative of velocity with time, hence

\begin{aligned} a=\frac{dv}{dt}= x_0 \omega^2 \sin \omega t\end{aligned}

But from the first equation x = x_0 \sin \omega t , we have

\begin{aligned} a = -x_0 \omega^2 \end{aligned}

Equation relating velocity to displacement

In the above equations, we have relationships with respect to time. We can also determine the velocity of the object if the displacement is known.

From the original displacement-time equation,

\begin{aligned} x&=x_0 \sin{\omega t} \end{aligned}

\begin{aligned} v=x_0 \omega \cos{\omega t} \end{aligned}

Squaring both equations, we have

\begin{aligned} x^2&=x_0 ^2 \sin^2{\omega t}\\v^2&=x_0 ^2 \omega ^2\cos^2{\omega t}\\&=x_0 ^2 \omega^2 (1-\sin^2{\omega t})\\&=x_0 ^2 \omega^2(1-\frac{x^2}{x_0 ^2})\end{aligned}

Simplifying,

\begin{aligned} v^2 &= \omega^2(x_0 ^2 - x^2) \end{aligned}

Hence,

\begin{aligned} v = \pm\omega \sqrt(x_0 ^2 - x^2) \end{aligned}

The Restoring Force

It is important to understand that the restoring force is the resultant of both the spring force and the weight of the oscillator. Since weight is constant, the restoring force would be proportional to the spring force, F=-kx. Hence, the restoring force is never constant.

\begin{aligned} F_R=F_S-w \end{aligned}

where F_R is the restoring force and F_S is the spring force.

From the equation, it can be seen that the maximum restoring force occurs when F_S is maximum, which occurs when the displacement is at maximum. This is also the position where the acceleration is maximum(and zero velocity).

Phases of an SHM

\begin{aligned} x &= x_0 \sin \omega t \\ v &= x_0 \omega \cos \omega t\\ a &= -x_0 \omega ^2 \sin \omega t\end{aligned}

As we can see,

  • the velocity of SHM v and displacement x has a phase difference of \begin{aligned} \frac{\pi}{2} \end{aligned} .
  • The acceleration a and the displacement has a phase difference of \pi.
  • The acceleration and velocity has a phase difference of \frac{\pi}{2}

Review Question 1

Using the blue graph above, sketch the corresponding graphs of v and a.

Simple Harmonic Motion and Circular Motion

Simple harmonic motion is closely related to a uniform circular motion.

A real life simple harmonic motion.

Review Question 1

Answer the following questions as you watch the first YouTube video(Simple harmonic motion and uniform circular motion).

  1. How does the centre of the red cylinder and the green ball relate?
  2. At which part of the SHM(left) is the red cylinder moving the fastest and slowest?
  3. At which part of the circular motion(right) is the green ball moving vertically the fastest and slowest?

Review Question 2

Navigate to this site. This animation shows how a 4-stroke engine internal combustion works.

Answer the following questions:

piston

  1. The piston is moving with SHM. At which point is the piston the fastest?
  2. At which point is the piston moving the slowest?

piston2

Given that the maximum velocity of the piston is v,

  1. write down the expression of the velocity of the piston at the position shown in the diagram.
  2. write down the expression of the acceleration of the piston at the position shown in the diagram.
  3. Sketch a velocity-time graph of the SHM demonstrated by the piston. Draw two complete cycles and label the parts A, B and C on your graph.

 

Typing Equations on WordPress

Many teachers have asked me how I manage to put up those beautiful equations onto my posts. In this article, I will explain how I use LaTex to create those equations in my posts.

LaTex

LaTex is a system that scientists used to write their scientific journals. LaTex is huge. According to the LaTex organisation ,

LaTeX is a document preparation system for high-quality typesetting. It is most often used for medium-to-large technical or scientific documents but it can be used for almost any form of publishing.

You could create a whole document using LaTex. However, for most teachers, we usually use our favorite word processors to create our document, inserting equations only when necessary. Some word processors have built-in features that allow you to type equations. Others require you to install third party software, such as MathType.

For web sites, you would need to check whether your content management system allows third party plugins to enable LaTex entry. Most popular CMS would have such plugins made available by third party, including WordPress. However, WordPress takes a step further by including this function in its default setup.

Enabling LaTex in WordPress

If you are logging into the official WordPress website, then LaTex is already enabled by default. If you are using a hosted WordPress site, you would need to create an account with WordPress.com site and link your hosted WordPress with the WordPress.com account using Jetpack. After you linked up the account, activate Beautiful Math function under the Jetpack setting.

LaTex Basics

To type an equation, you would enclose the expression within the [latex] and [/latex] short code.

a=b+c is typed as [latex]a=b+c[/latex].

Space is ignored, so there is no difference whether you typed one for two spaces or even no space for formatting purpose. You may try typing [latex] a  =b +       c[/latex] and you would get the same result as above.

Symbols

To insert symbols, you would use the forward slash i.e. \times would produce \times.

Symbols

\times : \times
\div : \div
\approx : \approx

Greek symbols

The codes for Greek symbols are the name of the symbols.

\alpha : [latex]\alpha[/latex]
\beta : [latex]\beta[/latex]
\gamma : [latex]\gamma[/latex]

For symbols that are Greek capitals, capitalise the first letter. For example,

\omega - \Omega : [latex]\omega – \Omega [/latex]

Mathematical structures

\frac{x}{y} : [latex]\frac{x}{y}[/latex]
x^y : [latex]x^y[/latex]
x_y : [latex]x_y[/latex]
\begin{aligned}\frac{dy}{dx}  \end{aligned} : [latex]\frac{dy}{dx}[/latex]
\begin{aligned} \int_a^b x^2 dx \end{aligned}  : [latex]\int_a^b x^2 dx[/latex]

Text, including units

\text{This is a statement.}

To get a full list, use this cheat sheet.

Combinations

The power of LaTex comes when you combine the above codes. For example,

\begin{aligned} \text{circumference of circle }=\frac{\pi d^2}{4} \end{aligned} : [latex] \text{circumference of circle }=\frac{\pi d^2}{4} [/latex]
\begin{aligned} F_\text{charge} = \frac{1}{4 \pi \epsilon_0}\frac{Q_1 Q_2}{r^2} \end{aligned} : [latex] F_\text{charge} = \frac{1}{4 \pi \epsilon_0}\frac{Q_1 Q_2}{r^2} [/latex]

Multiple Equations

Very often, you would want to show derivations of include multiple lines of equations. The ideal way would be to align the equal signs so that the list of equations looks neat. To do that, we need to add the aligned formatter.

\begin{aligned} \text{kinetic energy}&=\frac{1}{2}mv^2\\&=\frac{1}{2}(0.50)(2^2)\\&= 1 \text{ J}\end{aligned} :
[latex]\begin{aligned} \text{kinetic energy}&=\frac{1}{2}mv^2\\&=\frac{1}{2}(0.50)(2^2)\\&= 1 \text{ J}\end{aligned} [/latex]

Use & to fix the alignment character. In the above example, &= will align all the equal signs.

Review

Challenge 1

Enable LaTex entry for your WordPress site.

Challenge 2

Using LaTex, create the following equations on your site.

\begin{aligned} E&=mc^2 \\ \text{specific heat capacity}&=mc\Delta \theta\\\frac{1}{R_\text{total}}&=\frac{1}{R_1}+\frac{1}{R_2}+...\end{aligned}

 

 

Mathematics of Circular Motion

Angular Displacement

The angle which an object moves around a circle is called the angular displacement. This angle is usually expressed in radians.

\begin{aligned} \pi = 180^\circ \end{aligned}

Hence, there are 2 \pi radians in one complete circle.

The relationship between the angle in radian and the circle is

\begin{aligned} \theta =\frac{s}{r} \end{aligned}

where s is the angular displacement in radians, and r is the radius of the circle. The unit of \omega is \text{rad s}^{-1} .

Angular Velocity

Angular velocity is the rate of change of angular displacement.

Mathematically, angular velocity \omega is

\begin{aligned} \omega = \frac{\Delta \theta}{\Delta t} \end{aligned}

Since an object moves one circumference in one period time, we have

\begin{aligned} \omega &= \frac{2 \pi}{T}\\v &= \frac{2 \pi r}{T}\end{aligned}

Eliminating T ,

\begin{aligned} v=r\omega \end{aligned}

Review

Question 1

An object moves round a circle of 15 cm radius at a constant speed. It completes one revolution in 8.0 s. Calculate its angular velocity and its velocity.

Solution

\begin{aligned} \omega &= \frac{2 \pi}{8.0}\\&= 0.785\text{ rad s}^{-1}\end{aligned} \begin{aligned} v &= r \omega\\&= 15 \times 0.785\\&= 11.8\text{ cm s}^{-1}\end{aligned}