## Calculus! For beginners, with a ‘no theorems’ approach!

Pages:  1  2    4   aga - 30-4-2016 at 11:42

Oh bugger.

I remember that formula (vaguely) from school, but did not recognise the derivative as a Quadratic equation.

Heigh-ho.

Got it half right, which is pretty good for a Saturday !

### Minimum distance problem:

blogfast25 - 3-5-2016 at 05:45

A planner for Vulture Chemicals plots a grid on a map and determines that VC’s four most important customers are located at A(1, 5), B(0, 0), C(8, 0) and D(4,9) where units are in 100 miles. At what point W(x, y) should a warehouse be located in order to minimize the sum of the distances from W to A, B, C, and D?

Preamble:

In a Cartesian coordinate system the distance between two points:
$$(x_1,y_1),(x_2,y_2)$$
... can be calculated as follows:
$$d=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$$
For this problem it's easier to use the squares of the distances:
$$d^2=(x_1-x_2)^2+(y_1-y_2)^2$$
If S is the sum of the squares of the distances for all four customers to the planned warehouse:
$$S=\Sigma d^2$$
Then:
$$S(x,y)=[(x-1)^2+(y-5)^2]+(x^2+y^2)+[(x-8)^2+y^2]+[(x-4)^2+(y-9)^2]$$
By means of the partial derivatives fx and fy, find the minimum for S.

(This is the last optimisation problem. Next: famous second order DVs)

[Edited on 3-5-2016 by blogfast25]

woelen - 3-5-2016 at 05:50

What you do is not equivalent. Minimizing the sum of distances in general need not give the same result as minimizing the sum of the squares of distances. It may be that in this particular case the answer is the same (I did not do any math on this), but in general this certainly is not the case.
aga - 3-5-2016 at 07:32

Is this the S(x,y) = 0 thing ?

If so,
$$S(x,y)=[(x-1)^2+(y-5)^2]+(x^2+y^2)+[(x-8)^2+y^2]+[(x-4)^2+(y-9)^2]$$
$$=x^2-2x+1+y^2-10y+25+x^2+y^2+x^2-16x+64+y^2+x^2-8x+16+y^2-18y+81$$
$$=4x^2+4y^2-26x-28y+187$$
$$f_x = 8x-26, f_y = 8y-28$$
$$f_x = 0, x=\frac {26}{8} = 3.25$$
$$f_y = 0, y=\frac {28}{8} = 3.5$$
$$\therefore S(x,y) = 0 = S(3.25, 3.5)$$

It looks like point D should be (9, 4) where it is shown on the plot, rather than (4, 9).

@woelen: i think the excercise was made more interesting by having an actual application.

Whether it works or not is a moot point, especially if it's me doing the calculations !

blogfast25 - 3-5-2016 at 08:16

@aga:

Correct!

But your final statement is not:

$$S(x,y) = 0 = S(3.25, 3.5)$$

The sum of the distances is far from zero. But fx=fy=0, for (3.25,3.5).

The D point was badly drawn, but the (4,9) coordinates were correct and as intended.

It's also a little quicker if you use the chain rule on terms like:
$$(x-4)^2$$
$$f_x=2(x-4) \times f_x(x-4)=2(x-4) \times 1=2(x-4)$$
Still, as they say: 'whatever works for you'.

[Edited on 3-5-2016 by blogfast25]

blogfast25 - 3-5-2016 at 08:29

 Quote: Originally posted by woelen What you do is not equivalent. Minimizing the sum of distances in general need not give the same result as minimizing the sum of the squares of distances. It may be that in this particular case the answer is the same (I did not do any math on this), but in general this certainly is not the case.

You're correct.

If:
$$d_i=\sqrt{(x-x_i)^2+(y-y_1)^2}$$
Then:
$$S=\Sigma d_i=\Sigma_i \sqrt{(x-x_i)^2+(y-y_1)^2}$$
And:
$$f_x=\Sigma_i \frac{(x-x_i)}{\sqrt{(x-x_i)^2+(y-y_1)^2}}$$
$$f_y=\Sigma_i \frac{(y-y_i)}{\sqrt{(x-x_i)^2+(y-y_1)^2}}$$
Then that would not give the same results as we computed.

I found the exercise somewhere, made it a little harder but didn't stop to think. Grrr.

[Edited on 3-5-2016 by blogfast25]

aga - 3-5-2016 at 09:27

 Quote: Originally posted by blogfast25 I found the exercise somewhere, made it a little harder but didn't stop to think. Grrr.

Teaching is a 2 way thing.

Maybe a little has rubbed off

blogfast25 - 3-5-2016 at 11:29

 Quote: Originally posted by aga Maybe a little has rubbed off

Don't get me worried...

### Famous second order DEs:

blogfast25 - 3-5-2016 at 11:33

Newtonian equations of motion:

Consider an object of mass m on which a number of forces act, shown below are 3 forces:

Then Newton’s Second Law tells us:
$$\Sigma_i \vec{F_i}=m\vec{a}$$
Worded: 'the vector sum of the acting forces equals the mass times the acceleration vector'

Analytically, this is usually solved by using the property that motions in the x, y and z directions are completely independent of each other. This allows to break down the vector problem into three independent non-vector equations:
$$\Sigma_i F_{x,i}=ma_x$$
$$\Sigma_i F_{y,i}=ma_y$$
$$\Sigma_i F_{z,i}=ma_z$$

From now on we’ll drop the indices x, y and z because it is usually very clear from the context of the problem which axis is meant. Also we’ll call:
$$\Sigma_i F_i=F$$
Where F is the sum of the force components along the intended axis, often also called the net force (along that axis).
So for a given axis we can now simply write:
$$ma=F$$
Also:
$$m\frac{dv}{dt}=F$$
And (for an x-axis):
$$m\frac{d^2x}{dt^2}=F$$
Specific examples:

1. F is constant:

Real world example: a free falling body (without drag).
$$m\frac{dv}{dt}=F$$
Integrate with boundary conditions t=0, v=v<sub>0</sub>, x=x<sub>0</sub>:
$$\int_{v_0}^v dv=\int_0^t \frac{F}{m}dt$$
$$\implies v(t)=v_0+\frac{F}{m}t$$
$$v(t)=\frac{dx(t)}{dt}=v_0+\frac{F}{m}t$$
Integrate again:
$$\int_{x_0}^xdx=\int_0^t(v_0+\frac{F}{m}t)dt$$
$$\implies x(t)=x_0+v_0t+\frac{F}{2m}t^2$$
2. F is a function of v:
$$ma=f(v)$$
$$m\frac{dv}{dt}=f(v)$$
Integrate:
$$m\int \frac {dv}{f(v)}=\int dt$$
Alternatively:
$$mx''(t)=f[x'(t)]$$
Real world example: projectile with drag. We derived such a problem higher up:
$$ma=mg-F_{drag}$$
Specifically:
$$v’=9.8-\frac{5v}{50}=9.8-\frac{v}{10}$$
We solved this by twice integrating, to obtain x(t).

But it can also be solved by writing it as:
$$\frac{d^2x}{dt^2}=9.8-\frac{1}{10}\frac{dx}{dt}$$
Or:
$$x''+0.1x'-9.8=0$$
The boundary conditions were:
$$t=0, x(0)=0, x'(0)=-10$$
I used Wolfram Alpha's DSolve function for this and obtained:
$$x(t)=98t+1080e^{-0.1t}-1080$$
Which is also what we found before.

[Edited on 3-5-2016 by blogfast25]

aga - 3-5-2016 at 11:48

In
$$\Sigma_i \vec{F_i}=m\vec{a}$$
what does the i signify ?

The arrows mean Vectors, although quite how they work is a mystery.

A bit of utoob showed a tail-to-tip example which made sense in isolation (vector addition).

Putting them into an equation, Fwooosh ! Straight over head.

Edit:

It is nice to see that Wolfram got it right as well

Another thing: why is an accurate depiction of my brain being used in the example image ?

[Edited on 3-5-2016 by aga]

blogfast25 - 3-5-2016 at 12:20

 Quote: Originally posted by aga In $$\Sigma_i \vec{F_i}=m\vec{a}$$ what does the i signify ? The arrows mean Vectors, although quite how they work is a mystery. A bit of utoob showed a tail-to-tip example which made sense in isolation (vector addition). Putting them into an equation, Fwooosh ! Straight over head. Edit: It is nice to see that Wolfram got it right as well Another thing: why is an accurate depiction of my brain being used in the example image ?

i is the index (number) of a force, as in:
$$F_1,F_2,...,F_i,...,F_n$$

Vector calculation:

Right: an example of two vectors being added up.

Left: F would be the resultant vector from adding up all vectors on the brain:

$$\Sigma_i \vec{F_i}=\vec{F}$$
The acceleration vector

$$\vec{a}$$

... is obtained by:

$$\vec{a}=\frac{\vec{F}}{m}$$

Both F and a vectors thus are parallel and point in the same direction, they're simply different in size.

But as explained, usually we kind of avoid all that vectoring by looking at the x,y,z force components.

I'll post a simple example.

[Edited on 3-5-2016 by blogfast25]

aga - 3-5-2016 at 12:33

So in
$$\Sigma_i \vec{F_i}=\vec{F}$$
the meaning of
$$\vec{F}$$

is : "The sum of all i nvolved vectors"

Figuring out the Words is almost as hard as the maths.

blogfast25 - 3-5-2016 at 12:52

 Quote: Originally posted by aga So in $$\Sigma_i \vec{F_i}=\vec{F}$$ the meaning of $$\vec{F}$$ is : "The sum of all i involved vectors" Figuring out the Words is almost as hard as the maths.

Yes!

Now hold your fire for 5 mins.

### Object sliding down an incline:

blogfast25 - 3-5-2016 at 13:10

Consider an object of mass m sliding down a smooth incline (angle theta), without friction or drag:

Carefully note the choice of x and y-axis, please.

What are the forces and accelerations in play?

The weight mg is decomposed into an x and a y-component.

y-axis:

$$F_y=-mg\cos \theta$$

This force is countered by a reaction force FN provided by the incline, so that:

$$F_N-mg\cos\theta=0$$
There's no NET force acting on the object in the y-direction.
$$\implies a_y=0$$

No acceleration in the y-direction.

x-axis:

$$F_x=mg\sin \theta$$

In the absence of friction or drag, Fx is also the ONLY force acting on the object along the x-axis, so:

$$ma_x=mg\sin\theta$$
$$\implies a_x=g\sin \theta$$

The object will accelerate along the x-axis with constant acceleration:
$$a_x=g\sin \theta$$
<hr>
Fun with a shopping trolley and two toddlers!

You're pushing a shopping trolley with force F1. Toddler 1 want to pull the trolley towards the chocolates with force F3, while toddler 2 want to pull it to the toys, with force F2:

On the right we add up the force vectors, first F3 + F1, then add to that F2, to get the resultant ('net') force FR.

The trolley will experience an acceleration vector a:

$$\vec{a}=\frac{\vec{F_R}}{m}$$

[Edited on 4-5-2016 by blogfast25]

aga - 4-5-2016 at 10:25

Could the Distribution centre problem not be solved with vector maths ?

I.e. the distance being the Force, and the angle being the other bit of the vector.

I guess it'd get complicated finding a common solution, unless that's what vector derviatives are all about.

blogfast25 - 4-5-2016 at 11:05

 Quote: Originally posted by aga Could the Distribution centre problem not be solved with vector maths ?

Coming up, another example of a Newtonian equation of motion.

aga - 4-5-2016 at 11:26

I started thinking about working from the Centre and solving for each of the vector forces, then realised that the Centre is the actual answer.

Amazingly, over 10 years ago i posed this exact question on a freelance programmer's website to get a way to calculate the position of a mobile phone tower based on GPS co-ordinates with TA values in order to map where all the mobile towers are.

TA=Timing Advance = 1 for every 550m your phone is away from the tower.

It's used for keeping phones at differing distances away from the tower in synch with the tower's timing chain.

The idea was to implement a non-GPS based positioning system based on Known tower sites.

Cheap too, as the GSM units do not even need a SIM card (=no contract) to get the TA information (phones MUST connect with no SIM to do 999/112 calls).

Never did get any useful solution, then they went and released the tower locations on a public website.

Contemporaneously Google released Google Maps which blew away all the vector mapping companies.

blogfast25 - 4-5-2016 at 11:28

3. F is a function of x:

Real world example: Simple Harmonic Oscillator.

A massless Hookean spring with spring constant k is anchored at A and attached to an object of mass m. Ignore all friction or drag.

Initially the spring is neither extended nor compressed but at t=0 we move the object to x=x0, then release it. The restoring force exerted by the spring is kx and the Newtonian equation is:

$$ma_x=-kx(t)$$
$$a_x=\frac{d^2x(t)}{dt^2}=x''(x)$$
$$mx''(t)+kx(t)=0$$
Or in 'shorthand':
$$mx''+kx=0$$
We assume the solution to be of the general form:
$$x=C_2\cos C_1 x$$
So:
$$x'=-C_2C_1 \sin C_1 x$$
$$x''=-C_2C_1^2\cos C_1 x$$
Plug it all into the DV:
$$-mC_2C_1^2\cos C_1 x+kC_2\cos C_1 x=0$$
C2cosC1x drops out and we get:
$$mC_1^2=k$$
$$C_1=\sqrt{\frac{k}{m}}$$
Now with the boundary condition:
$$t=0, x=x_0$$
$$\implies C_2=x_0\cos 0=x_0$$
So:
$$x(t)=x_0\cos \Big(\sqrt{\frac{k}{m}}t\Big)$$
C1 is often called the angular velocity, omega:
$$\omega=\sqrt{\frac{k}{m}}$$
The frequency of oscillation is:
$$f=\frac{1}{2\pi}\sqrt{\frac{k}{m}}$$
The period of oscillation is:
$$T=\frac1f$$
<hr>
Would it matter if we rotate the whole set up, axis included, clockwise by 90 degrees? The object would then be hanging off the spring.

Let's see. The Newtonian equation now is:

$$ma=mg-kx(t)$$
$$mx''(t)+kx(t)-mg=0$$
$$mx''(t)+k[x(t)-\frac{mg}{k}]=0$$
Substitute:
$$u=x(t)-\frac{mg}{k}$$
$$u'=x'(t)$$
$$u''=x''(t)$$
$$mu''+ku=0$$
The derivation is the same as above and yields:
$$x(t)=\Big(x_0-\frac{mg}{k}\Big)\cos \Big(\sqrt{\frac{k}{m}}t\Big)$$
So gravity doesn't affect angular velocity, frequency or period of oscillation. Only amplitude is affected.

[Edited on 4-5-2016 by blogfast25]

aga - 4-5-2016 at 11:35

Wow !

I assumed Gravity would have an effect on the frequency, although that may be due to naturally shoving friction in there.

[Edited on 4-5-2016 by aga]

blogfast25 - 4-5-2016 at 13:35

 Quote: Originally posted by aga Amazingly, over 10 years ago i posed this exact question on a freelance programmer's website to get a way to calculate the position of a mobile phone tower based on GPS co-ordinates with TA values in order to map where all the mobile towers are.

There's a numerical solution to the minimum distance problem.

Create a Cartesian x,y grid (shown in blue) and calculate the sum of distances for each x,y point. A visual inspection (or Excel triage) will show you where you are near to the optimum (x,y) point. Repeat with a finer mesh x,y grid in that area, for greater precision.

 Quote: Originally posted by aga Wow ! I assumed Gravity would have an effect on the frequency, although that may be due to naturally shoving friction in there. [Edited on 4-5-2016 by aga]

There are numerous applications of SHOs (see e.g. pendulum clocks) and some with engineered friction, like a car's shock absorbers which provides a critically damped SHO:

http://hyperphysics.phy-astr.gsu.edu/hbase/oscda2.html

In such a device the initial perturbation x0 is absorbed and then the system returns to x=0 as soon as possible.

The idealised DV is:

$$mx''+kx-g=\epsilon x'$$

... because the friction force is:

$$F_F=\epsilon v=\epsilon x'$$

[Edited on 5-5-2016 by blogfast25]

aga - 5-5-2016 at 11:55

I imagined the solution would be simpler in polar co-ordinates, seeing as the Location and Distance are the 'known' elements.

Perhaps that's why it never got figured out properly.

blogfast25 - 5-5-2016 at 12:36

 Quote: Originally posted by aga I imagined the solution would be simpler in polar co-ordinates, seeing as the Location and Distance are the 'known' elements. Perhaps that's why it never got figured out properly.

Polar coordinates wouldn't help at all here. And distance is definitely an unknown element here...

More about the facility location problem, here: it's hard and has been from about 1860!

[Edited on 5-5-2016 by blogfast25]

aga - 5-5-2016 at 12:46

Sorry, i was thinking about the mobile phone towers problem there.

The TA value is basically a discrete integer representing a 550m increment per step : basically the distance to the the tower with crappy granularity.

So the two known values would be GPS co-odinates of the A,B,C,D locations, each with a known TA (=crappy granuarity distance) from the central point = (The tower).

Problem was to calculate the GPS co-ordinates of that central point from a set of n GPS readings and measured TA values.

The geometry kind of suggested that at least 3 readings from varied positions would be needed to get an actual 'fix'.

Edit: these were the considered cases :

'X' marks the tower spot.

A,B, C are the known positions, the radius from each being the known distance to X.

F is the false positive, it being the same distance from A and B.

[Edited on 5-5-2016 by aga]

### The Schrödinger equation (SE):

blogfast25 - 6-5-2016 at 08:14

No mini-Pantheon of famous second order DEs can be complete without one of the most successful physics equations ever. Here it is again, time-independent and for one dimension only:
$$-\frac{\hbar^2}{2m}.\frac{d^2\psi(x)}{dx^2}+V(x)\psi(x)=E\psi(x)$$
Now let’s see if with our new-found calculus ability we can analytically solve the simplest of all quantum problems: a particle in a one dimensional box (Pi1DB, see also the QP thread):

Mathematically:
$$-\frac{L}{2} \leq x\leq +\frac{L}{2}\:\text{then}\: V=V_0$$
$$|x| > \frac{L}{2} \:\text{then}\: V=+\infty$$
So the SE becomes:
$$-\frac{\hbar^2}{2m}.\frac{d^2\psi(x)}{dx^2}+V_0\psi(x)=E\psi(x)$$
Or:
$$-\frac{\hbar^2}{2m}.\frac{d^2\psi(x)}{dx^2}=(E-V_0)\psi(x)$$
So we’re looking for a function that twice derived kind of, sort of looks like the negative of itself. That’s quite reminiscent of:
$$(\sin x)'=\cos x$$
$$(\cos x)'=-\sin x$$
Or:
$$-(\sin x)''=\sin x$$
So we tentatively propose a solution of the form:
$$\psi=A\sin kx$$
$$\psi'=Ak\cos kx$$
$$\psi''=-Ak^2\sin kx$$
Plug it all into the SE:
$$-\frac{\hbar^2}{2m}(-Ak^2\sin kx)=(E-V_0)A\sin kx$$
$$\frac{\hbar^2}{2m}k^2=(E-V_0)$$
So it seems to be a fit but what are k and A?

We know that:
$$x=+\frac{L}{2}\implies \psi=0$$
$$\implies A\sin \Big(k\frac{L}{2}\Big)=0$$
And because:
$$A \neq 0$$
$$\implies \frac{kL}{2}=2\pi n$$
$$n=1,2,3,...$$
So:
$$k=\frac{4\pi n}{L}$$
$$\psi=A\sin \Big(\frac{4\pi n}{L}x\Big)$$
Also:
$$E_n=V_0+\frac{8\pi^2\hbar^2n^2}{mL^2}$$
To find A we need to apply the Normalisation condition:
$$\int_{-L/2}^{+L/2}\psi^2dx=1$$
$$\int_{-L/2}^{+L/2}\big[A\sin \Big(\frac{4\pi n}{L}x\Big)\Big]^2dx=1$$
It’s a banal integral which I’ll leave for readers to check, which yields:
$$A=\sqrt{\frac{2}{L}}$$
$$\psi_n(x)=\sqrt{\frac{2}{L}}\sin \Big(\frac{4\pi n}{L}x\Big)$$

First 8 wave functions (not to scale):

[Edited on 6-5-2016 by blogfast25]

[Edited on 6-5-2016 by blogfast25]

The Volatile Chemist - 6-5-2016 at 08:59

This thread suddenly passed my level of knowledge, haha. I just took my AP Calculus AB test for university credit yesterday. Good stuff.
aga - 6-5-2016 at 10:08

Don't feel too bad - it was way over my head from the start !

At this point, i can now follow large chunks of what is shown, which is Vast improvement.

blogfast25 - 6-5-2016 at 11:21

 Quote: Originally posted by The Volatile Chemist This thread suddenly passed my level of knowledge, haha. I just took my AP Calculus AB test for university credit yesterday. Good stuff.

Hope you pass!

 Quote: Originally posted by aga At this point, i can now follow large chunks of what is shown, which is Vast improvement.

At least that's a modest achievement, for both of us!

[Edited on 6-5-2016 by blogfast25]

aga - 6-5-2016 at 12:54

 Quote: Originally posted by blogfast25 At least that's a modest achievement, for both of us!

You are very much understating your achievements.

2 years ago i knew nothing of chemistry, quantum mechanics, higher maths or bodily hygiene.

Maths, Physics and Chemistry are great, although a few words on bodily hygiene would be helpful.

I very much hope that Others follow your lectures, and i really wish more people would join in.

Perhaps they would if i didn't smell so bad.

Edit:

Of course TVC will Pass !

A bit shy, but very bright indeed.

[Edited on 6-5-2016 by aga]

blogfast25 - 6-5-2016 at 13:06

@aga:

Well, I'll put that feather in my cap then.

And I continue thoroughly, nay: streneously, to deny any involvement with any bodily thingymejibs of whatever kind.

[Edited on 6-5-2016 by blogfast25]

aga - 6-5-2016 at 13:09

Oh well, back to OC then to discover the identities of the highly active aromatics in my armpits ...

The IUPAC name is probably 1,2,3,GottaPukeNow-o-PassOut.

Edit:

Some progress already ! I predict an isomer:
1,4,Gag-o-Run, 2-Puke, 3-b'jeysus, which is clearly a lachrymator.

[Edited on 6-5-2016 by aga]

blogfast25 - 6-5-2016 at 14:12

Tomorrow and Sunday, to the joy of the many and sadness of the few, what will be kind of the 'final' instalments, these on the Heat Equation.

After that and depending on demand, some random questions, answers, exercises etc into which this thread will peter out. To oblivion and beyond!

[Edited on 6-5-2016 by blogfast25]

aga - 6-5-2016 at 14:32

Demand.

### Heat Equation (one dimension only):

blogfast25 - 7-5-2016 at 07:07

Consider a straight rod of length L, constant cross-section A, made of a homogeneous material of density ρ, heat capacity c<sub>p</sub> and heat conductivity k.

At some point we start heating (or cooling) a section of the rod. This creates a dynamic situation: temperature T will now depend on position x, as well as time t:
$$T=f(x,t)$$
Before deriving the DV that describes the phenomenon, two more definitions are needed:

φ(x,t) is the heat flux (W/m<sup>2</sup> inside the rod due to heat conduction.

Q(dot)(x,t) is the heat input (or sink) per unit of volume per unit of time. We’ll keep Q(dot) a little vague for now, as its actual form will depend strongly from problem to problem.

To set up the DV, we set up the heat balance of an element of length Δx:
$$A\rho c_p \Delta x \frac{\Delta T}{\Delta t}=Aφ(x)-Aφ(x+\Delta x)+ A\Delta x \dot{Q}$$

Divide both sides by AΔx and rearrange slightly:
$$\rho c_p\frac{\Delta T}{\Delta t}=-\frac{φ(x+\Delta x)-φ(x)}{\Delta x}+\dot{Q}$$
Now take the limit of both sides to get derivatives:
$$\rho c_p \lim_{\Delta t \to 0} \frac{\Delta T}{\Delta t}=-\lim_{\Delta x \to 0}\frac{φ(x+\Delta x)-φ(x)}{\Delta x}+\dot{Q}$$
$$\rho c_p\frac{\partial T}{\partial t}=-\frac{\partial φ}{\partial x}+\dot{Q}$$
Looks ‘pretty’ perhaps but it isn’t very useful: we need to eliminate φ(x,t). To do so we use Fourier’s law on heat conduction:
$$φ(x)=-k\frac{\partial T}{\partial x}$$
Insert into the previous equation:
$$c_p\rho \frac{\partial T}{\partial t}=-\frac{\partial}{\partial x}\Big(-k\frac{\partial T}{\partial x}\Big)+\dot{Q}(x,t)$$
$$c_p\rho \frac{\partial T}{\partial t}=k\frac{\partial^2T}{\partial x^2}+\dot{Q}(x,t)$$
Call κ (kappa) the heat diffusivity:
$$\kappa=\frac{k}{c_p\rho}$$
$$\frac{\partial T}{\partial t}=\kappa \frac{\partial^2T}{\partial x^2}+\frac{\dot{Q}(x,t)}{c_p\rho }$$

After some time of constant heating (or cooling) a steady state will have been achieved, where T(x,t) will no longer depend on t, so:
$$\frac{\partial T}{\partial t}=0$$
The heat equation then reduces to the steady state version:
$$\kappa \frac{d^2T}{dx^2}+\frac{\dot{Q}(x,t)}{c_p\rho }=0$$
<hr>
Next up: two applications of the heat equation.

[Edited on 7-5-2016 by blogfast25]

aga - 7-5-2016 at 08:09

We still have not done limit theory yet, have we ?

How does one 'take the limit' ?

blogfast25 - 7-5-2016 at 09:10

 Quote: Originally posted by aga We still have not done limit theory yet, have we ? How does one 'take the limit' ?

No, because this thread is a 'theorem free zone' (kind of), remember?

But we have seen the basics.

In essence, is we have a function f(x), then limit theory tells us:

$$\lim_{\Delta x \to x}\frac{f(x+\Delta x)-f(x)}{\Delta x}=\frac{df(x)}{dx}=f'(x)$$

For simple functions limit taking is easy. Take e.g. f(x) = 3x<sup>2</sup> - 4.

$$\frac{[3(x+\Delta x)^2-4]-[3x^2-4]}{\Delta x}$$
$$=\frac{3(x^2+2x\Delta x+\Delta x^2)-4-3x^2+4}{\Delta x}$$
$$=\frac{3x^2+6x\Delta x+3\Delta x^2-3x^2}{\Delta x}$$
$$=\frac{\Delta x(6x+3\Delta x)}{\Delta x}$$
$$=6x+3\Delta x$$
$$\Delta x \to 0$$
$$\implies 6x=\frac{df(x)}{dx}$$
Which is correct, as we know.

For more complicated functions, limit taking can be a lot harder, though...

[Edited on 7-5-2016 by blogfast25]

aga - 7-5-2016 at 11:55

Looks fairly hard with what (to You) is a simple example !
blogfast25 - 7-5-2016 at 12:51

Quick reminder of what is a derivative: definition of linear velocity

An object travels along an x-axis. At time t its position is x(t) and some time Δt later it is x(t+Δt).

Between these two points the average velocity would be:

$$v_{av}=\frac{\Delta x}{\Delta t}=\frac{x(t+\Delta t)-x(t)}{\Delta t}$$
But the True velocity is found by:
$$v(t)=\lim_{\Delta t \to 0}\frac{x(t+\Delta t)-x(t)}{\Delta t}=\frac{dx}{dt}$$

Halleluyah!

[Edited on 7-5-2016 by blogfast25]

blogfast25 - 7-5-2016 at 13:40

This limit taking lark, as in the heat equation set up, lies at the heart of setting up many DVs.

Take this simple example of a tank emptying itself through a bottom hole:

The tank with constant cross-section A and a sharply cut bottom hole of cross-section a obeys Torricelli's law (inertias assumed zero), so that volumetric rate through the bottom hole is:

$$Q_v=a\sqrt{2gh}$$

In a time interval Δt the height of fluid in the tank changes by:
$$\Delta y=y(t+\Delta t)-y(t)$$
That's a volume ΔV (negative sign is needed because ΔV is negative):

$$\Delta V=-A\Delta y$$
Divide by Δt:

$$\frac{\Delta V}{\Delta t}=-A\frac{y(t+\Delta t)-y(t)}{\Delta t}$$
Take the limit for Δt to 0, so we get:

$$\frac{dV}{dt}=-A\frac{dy}{dt}$$
This is of course another expression for Q<sub>v</sub>, so:
$$-A\frac{dy}{dt}=a\sqrt{2gy}$$
From this DV the total emptying time can then be calculated by integration.

[Edited on 8-5-2016 by blogfast25]

aga - 7-5-2016 at 14:53

Very clever having a hole in the top of the tank at the top right hand side.

I suspect the equations would be a bit more complex otherwise !

blogfast25 - 7-5-2016 at 16:11

 Quote: Originally posted by aga Very clever having a hole in the top of the tank at the top right hand side. I suspect the equations would be a bit more complex otherwise !

Yes. Pressure above the water would be dropping, reducing throughput.

If p0 is atmospheric pressure and V0 the volume of air in the tank at the start, then with Bernoulli and the Ideal Gas Law:

$$\frac{v^2}2+\frac{p_0}{\rho}=gy+\frac{p_0V_0}{\rho(V_0+Ay)}$$
$$\frac{v^2}2=gy+\frac{p_0V_0}{\rho(V_0+Ay)}-\frac{p_0}{\rho}$$
$$\frac{v^2}2=gy+\frac{p_0V_0}{\rho(V_0+Ay)}-\frac{p_0(V_0+Ay)}{\rho(V_0+Ay) }$$
$$\frac{v^2}2=gy-\frac{p_0Ay}{\rho(V_0+Ay)}$$
$$\frac{v^2}2=\frac{\rho gy(V_0+Ay)-p_0Ay}{\rho(V_0+Ay)}$$
$$\frac{v^2}2=\frac{[\rho g(V_0+Ay)-p_0A]y}{\rho(V_0+Ay)}$$
$$Q_v=a\sqrt{2\frac{[\rho g(V_0+Ay)-p_0A]y}{\rho(V_0+Ay)}}$$
$$-A\frac{dy}{dt}=a\sqrt{2\frac{[\rho g(V_0+Ay)-p_0A]y}{\rho(V_0+Ay)}}$$

Whether that's even analytically integratable remains to be seen!
<hr>
An additional consideration is needed here. In order for liquid to be able to flow out of the opening, the pressure on the tank side must always be higher than on the other side:
$$\frac{p_0V_0}{V_0+Ay}+\rho g y>p_0$$
The point where steady flow would stop is:
$$y=\frac{p_0A-\rho g V_0}{\rho gA}$$
Beyond that point, liquid would still be trying to leave and air trying to enter at the same time. This is what happens when you try and empty a full bottle of liquid by turning it up-side down!

[Edited on 8-5-2016 by blogfast25]

blogfast25 - 9-5-2016 at 07:17

A cooling fin is attached to a wall at T0, surrounded by a fluid at T:

We assume steady state and heat loss by convection only. For a segment of length Δx, convection heat loss is acc. Newton:
$$- p\Delta xh(T-T_{\infty})$$
(p is the perimeter of the fin, for a slab e.g. p = 2 x width + 2 x thickness)

The heat balance of that segment now is:
$$A\rho c_p \Delta x \frac{\Delta T}{\Delta t}=Aφ(x)-Aφ(x+\Delta x)- p\Delta xh(T-T_{\infty})$$
Deriving as for the general heat equation and for steady state, we obtain:
$$\frac{\partial^2T}{\partial x^2}-\frac{ph}{kA}(T-T_{\infty})=0$$
Solution:

Firstly a simple substitution:
$$\tau=T-T_{\infty}$$
$$\implies d\tau=dT,d^2\tau=d^2T$$
And call:
$$m^2=\frac{ph}{Ak}$$
Plugging into the DV:
$$\tau''-m^2\tau=0$$
This a linear, second order homogeneous DV and its solution is of the general form:
$$\boxed{\tau=c_1e^{mx}+c_2e^{-mx}}$$
Where c1 and c2 are two integration constants. We find these by applying the boundary conditions.

1st boundary condition:

For x=0, T=T0, which gives us:

$$T_0-T_{\infty}=c_1+c_2$$

2nd boundary condition:

Here we assume that at the end of the fin (x=L), no more heat conduction is possible and with Fourier's law that means:
$$\Big(\frac{d\tau}{dx}\Big)_{x=L}=0$$
$$\implies \frac{d\tau}{dx}=mc_1e^{mx}-mc_2e^{-mx}$$
$$c_1e^{mL}-c_2e^{-mL}=0$$
Together with:
$$T_0-T_{\infty}=c_1+c_2$$
... it's a simple system of simultaneous equations, from which c1 and c2 can be computed (I won't do that here).

Inserting these constants into the proposed solution and very considerable rework then yields:
$$\frac{T-T_{\infty}}{T_0-T_{\infty}}=\frac{\cosh\Big(\big(1-\frac{x}{L}\big)\sqrt{\frac{hp}{kA}}L\Big)}{\cosh\Big(\sqrt{\frac{hp}{kA}}L\Big)}$$
Note that the hyperbolic cosine means:
$$\cosh f(x)=\frac{e^{f(x)}+e^{-f(x)}}{2}$$

Heat dissipated by the cooling fin:

More important than the temperature profile of the fin is how much heat it withdraws from the wall (that is after all its purpose).

Because we're in steady state, we can calculate this as the heat conducted into the fin at the interface with the wall. That heat is then also what is dissipated by the fin because Qin=Qout. With Fourrier's law:

$$\dot{Q}_{x=0}=\left.-kA\frac{d}{dt}(T-T_{\infty})\right|_{x=0}$$
I'll only present the result here:
$$\dot{Q}_{x=0}=\sqrt{khpA} (T-T_{\infty})\tanh mL$$
With:
$$\tanh mL=\frac{e^{mL}-e^{-mL}}{e^{mL}+e^{-mL}}$$
An inspection of tanh ml shows that it increases with L but that there's hardly any more gain in Q for mL > 3. Excessively long fins hardly dissipate more heat than reasonably shorter ones.

[Edited on 9-5-2016 by blogfast25]

Eosin Y - 9-5-2016 at 07:57

@Blogfast25 are you a maths teacher? I'm in top maths set (out of 14) in the first year of British boarding school, and this goes right over my head.
aga - 9-5-2016 at 08:24

Bloggers is all sorts of teacher, and pretty good at it too.

I started there knowing just about nothing about calculus, apart from how to spell it.

blogfast25 - 9-5-2016 at 08:30

 Quote: Originally posted by Eosin Y @Blogfast25 are you a maths teacher? I'm in top maths set (out of 14) in the first year of British boarding school, and this goes right over my head.

No, I'm a Uni degree engineer (chemistry) but I love math.

Have you done any calculus (in particular rates and derivatives) in that first year at all? I thought that was more sixth form (or a bit before), vaguely remembering from my daughter's British education.

And second order ODEs aren't part of the A-level curriculum at all, IIRW...

[Edited on 9-5-2016 by blogfast25]

Eosin Y - 9-5-2016 at 09:04

Sort of. We've gone over what it is (basics viz. that it is the study of the function relative to the change in input) but we haven't got any further than that.

### Experimental determination of heat conductivity k:

blogfast25 - 10-5-2016 at 08:22

Finally another example of heat applied but this one without second order DEs!

The following set up allows the determination of the heat conductivity k on uniform, non-metallic materials:

A slab of the sample S is sandwiched between a heat source at constant T0 and a thin slab of copper. The copper slab is held against a highly insulating wall (very low k), so no heat can escape from the copper slab. The sample and copper slab thus heat up in time. A thermocouple measures the temperature of the copper slab during the experiment.

The heat flux through the sample slab can be calculated using Fourier:

$$\dot{Q}=-kA\frac{dT}{dx}$$
$$-kA\int_{T_0}^{T_{Cu}}dT=\dot{Q}\int_0^Ldx$$
$$\dot{Q}L=-kA(T_{Cu}-T_0)$$
$$\dot{Q}=-\frac{kA}{L}(T_{Cu}-T_0)$$

For the copper slab, assuming it's fairly thin, we assume a quasi-steady state, where:

$$\frac{dT}{dx}=0$$

Because Cu is such an excellent heat conductor and because the Cu is thinish that's a reasonable assumption.

With no heat lost, the copper slab will now heat up acc.:
$$\dot{Q}=mc_p\frac{dT_{Cu}}{dt}$$
With m the mass of Cu and cp the specific heat capacity of Cu. So we have an identity:
$$mc_p\frac{dT_{Cu}}{dt}=-\frac{kA}{L}(T_{Cu}-T_0)$$
This simple first order DV with separation of variables solves as:
$$\frac{dT_{Cu}}{T_{Cu}-T_0}=-\frac{kA}{mc_pL}dt$$
$$\int_{T_{Cu,i}}^{T_{Cu,t}}\frac{dT_{Cu}}{T_{Cu}-T_0}=-\frac{kA}{mc_pL}\int_0^tdt$$
$$\ln \frac{T_{Cu,t}-T_0}{T_{Cu,i}-T_0}=-\frac{kA}{mc_pL}t$$
Where TCu,i is the initial (t = 0) temperature of the copper slab.

Measuring TCu,t over time and plotting the left hand expression versus time gives a straight line with slope:

$$-\frac{kA}{mc_pL}$$

... from which k can then be calculated.

One thing that's neat about the method is that it requires no knowledge of the specific heat capacity of the sample material.

[Edited on 10-5-2016 by blogfast25]

Eosin Y - 11-5-2016 at 10:43

I think that this is calculus, in that it is an equation dedicated to the function relative to the input. Sorry if this is in the wrong thread. The following equation is for calculation of the VoD of energetics.
D=A(X(squared by 1/2))*(1+BP) where A=1.01, B=1.30, X=N*(M(squared by 1/2))*(Q(squared by 1/2)) and P = initial density. N=number of moles of gaseous detonation products, M=avg. mol weight of these products and Q=chemical energy of detonation reactivity. This was dug up from a piece of old literature.

blogfast25 - 11-5-2016 at 11:29

$$D=AX^{\frac12}(1+BP)$$
$$X=NM^{\frac12}Q^{\frac12}$$

Something like that?

TBH I'm not really sure what you mean by "X(squared by 1/2)"?

Eosin Y - 11-5-2016 at 11:34

Yes, exactly that. I couldn't think of a better way to explain it. How tf do you get those equations in your posts?
aga - 11-5-2016 at 11:59

 Quote: Originally posted by Eosin Y How tf do you get those equations in your posts?

SM supports LaTeX commands.

if you type two $together, followed by this : \int_{T_{Cu,i}}^{T_{Cu,t}}\frac{dT_{Cu}}{T_{Cu}-T_0}=-\frac{kA}{mc_pL}\int_0^tdt and then another two$ together, you get this :
$$\int_{T_{Cu,i}}^{T_{Cu,t}}\frac{dT_{Cu}}{T_{Cu}-T_0}=-\frac{kA}{mc_pL}\int_0^tdt$$

If you hover over one of that (or any) formulae and right click, a menu pops up which lets you see the raw command syntax.

Eosin Y - 11-5-2016 at 12:13

$D=AX^{1/2}(1+BP_{o})$

[Edited on 11-5-2016 by Eosin Y]

Eosin Y - 11-5-2016 at 12:17

It works! Thanks be to Aga
aga - 11-5-2016 at 12:40

Eosin Y was shown by aga was shown by blogfast25 who was shown by .....

The great thing about Information is that you can Give it away, and still keep it as well.

Eosin Y - 11-5-2016 at 13:02

Thanks for the help. Is my equation correct?
aga - 11-5-2016 at 13:31

 Quote: Originally posted by Eosin Y Is my equation correct?

No idea if it's assumptions are correct or gives any useful answer.

I'd write

D=A(X(squared by 1/2))*(1+BP)

as
$$D = (1+BP)AX^{\frac 12}$$
... just for clarity.

It's equivalent to :
$$D = AX^{\frac 12}(1+BP)$$
$$D = A(1+BP)\sqrt X$$
$$D = A\sqrt X + ABPX^{\frac12}$$
$$D = \sqrt X (A + ABP)$$

etc.

[Edited on 11-5-2016 by aga]

Eosin Y - 11-5-2016 at 13:48

No, let's find out.
Take RDX as an example. We can fill in certain constants and other information into this equation.
$D=(1.01*\delta^{1/2})(1+(1.3*1.82))$
Now, the only thing left to do is find delta when the following is true:
$\delta = NM^{1/2}Q^{1/2}$
RDX is C3H6N6O6 the decomposition of which works as such:
C3H6N6O6=3H2O+3CO+3N2
Therefore, N = 9.
Next, to work out M: H2O=18g/mol; CO=28g/mol; N2=28g/mol - plug in.
$M=\frac{(3*18)+(6*28)}{3}$
$M=74$
Finally, enthalpy of formation. In RDX, bond enthalpy = 7,149kj/mol
Given that this is true:
$\Delta H_{reaction}^{o}=\sum \Delta H_{f}^{o}(products)-\sum \Delta H_{f}^{o}(reagents)$
And the bond enthalpy of the products=8,817:
$\Delta H_{RDX decomposition}^{o}=7,149-8,817$
Finally, 7,149-8,817=-1668.
Plug these in, and we get:
$X=9*74^{1/2}*-1668^{1/2}$
$X=-3161.96$
At last:
$D=(1.01*(-3161.96)^{1/2})(1+(1.30*1.82))$
D=-191.163, apparently.
Where did it go wrong?

[Edited on 11-5-2016 by Eosin Y]

[Edited on 11-5-2016 by Eosin Y]

blogfast25 - 11-5-2016 at 14:55

Well, you sure learned how to use LaTex quickly, well done!

I can't check your result because I don't know whether the following is true:

 Quote: Originally posted by Eosin Y Finally, enthalpy of formation. In RDX, bond enthalpy = 7,149kj/mol Given that this is true: $\Delta H_{reaction}^{o}=\sum \Delta H_{f}^{o}(products)-\sum \Delta H_{f}^{o}(reagents)$ And the bond enthalpy of the products=8,817: $\Delta H_{RDX decomposition}^{o}=7,149-8,817$ Finally, 7,149-8,817=-1668.

The principle is correct but where did you get the actual data? Also, reaction enthalpies based purely on bond enthalpies tend to be approximate only. What are the reaction products you base your calculation on?

$$D=(1.01*(-3161.96)^{1/2})(1+(1.30*1.82))$$

One cannot take the square root of a negative number:

$$(-3161.96)^{1/2}=\sqrt{-3161.96}$$
... has no Real solution (only a Complex one).

[Edited on 12-5-2016 by blogfast25]

Eosin Y - 11-5-2016 at 21:27

It's a wrong equation. The answer should be ~8800!! I believe that the power for X might be a variable dependent on enthalpy of formation. If I can plot a Cartesian equation for this, I can plug that into x.

All my data about RDX, its products and its enthalpy came from here:https://www.youtube.com/watch?v=HpkGhuV7RPU

My LaTeX equations have been made here:https://www.codecogs.com/latex/eqneditor.php
You just plug LaTeX into the drop-down at the bottom, and lo and behold!

The actual value for the power of X is more like 0.975.
[Edited on 12-5-2016 by Eosin Y]

[Edited on 12-5-2016 by Eosin Y]

Eosin Y - 12-5-2016 at 05:10

$\delta _{RDX}=-3161.25$
I believe that the power of delta in the following equation:
D=A\delta ^{y}(1+BP_{o})
will always be 0.975.
Prove it. Picric acid first.
We can fill in certain constants and other information into this equation.
$D=(1.01*\delta^{0.975})(1+(1.3*1.82))$
Now, the only thing left to do is find delta when the following is true:
$\delta = NM^{1/2}Q^{1/2}$
Octonitrocubane is C8N8O16.
Density unpacked=1.98g/cm3
Decomposition goes like this: C8N8O16=8CO2+4N2.
Therefore, N=12.
Next, avg. mol weight:
$M=\frac{(8*44)+(4*28)}{2}$
$M=232$
Finally, Q:
$\Delta H_{reaction}^{o}=\sum \Delta H_{f}^{o}(products)-\sum \Delta H_{f}^{o}(reagents)$
$\Delta H_{reaction}^{o}=((12*348)+(8*293)+(8*201)+(8*607))-((16*799)+(4*941))$
$\Delta H_{reaction}^{o}=-3564 Plug in: \[\delta =12*\sqrt{232}*\sqrt{-3564}$
$\delta =-10912$
Finally,
$D=(1.01*-10912^{0.975})(1+(1.3*1.98))$
Apparently, VoD of octonitrocubane = 37,000m/s or so.
I need to do my own equation.

blogfast25 - 12-5-2016 at 06:40

 Quote: Originally posted by Eosin Y All my data about RDX, its products and its enthalpy came from here:https://www.youtube.com/watch?v=HpkGhuV7RPU My LaTeX equations have been made here:https://www.codecogs.com/latex/eqneditor.php You just plug LaTeX into the drop-down at the bottom, and lo and behold!

You can also test drive LaTex by going to:

https://www.mathjax.org/

Scroll down a bit and click 'Try a live demo'.

The values for:

$$\Delta H_{reaction}^{o}=\sum \Delta H_{f}^{o}(products)-\sum \Delta H_{f}^{o}(reagents)$$

... as practiced in that YouTube, using bond enthalpies are only approximate.

That's because the bond enthalpy of, say C-H, depends on its environment. In CH4 the value already differs a bit from in C2H6. And the values for C-H in C3H8 (n-propane) differ for the methylene group and the methyl groups.

The same is true of all other types of bonds. These differences, when calculating large molecules, can add up to quite a bit of error.

Eosin Y - 12-5-2016 at 07:07

I doubt that the error with my bond enthalpy formula would really amount to 300%+?
There's something else I could try...

blogfast25 - 12-5-2016 at 07:26

 Quote: Originally posted by Eosin Y I doubt that the error with my bond enthalpy formula would really amount to 300%+? There's something else I could try...

I'm not sure where you're coming from with the "300%+". I'm only saying that reaction enthalpies based on bond enthalpies are approximate at best.

I believe the decomposition enthalpies of most HEs must be tabled somewhere, ready for use.

Now this:

$$12*\sqrt{232}*\sqrt{-3564}$$

... is something you should NEVER write in a math exam!! You can't take the square root of a negative number (unless you're happy to obtain a Complex Number!)

Your formula calls for the modulus (aka 'absolute value') of the reaction enthalpy and that is a positive number.

To indicate multiplication, these are better:

$$12\sqrt{232}\sqrt{3564}=12\times \sqrt{232}\times\sqrt{3564}=12.\sqrt{232}.\sqrt{3564}$$

[Edited on 12-5-2016 by blogfast25]

Eosin Y - 12-5-2016 at 08:44

I got three hundred percent as the reading for total VoD - 37000m/s is the number that the formula that it spits out at the end, which is more than 300% of the intended figure - 10100m/s.

I might try seeing whether I can do a correlation on a 3D Cartesian graph with enthalpy of formation on the x axis, density on the z axis and velocity of detonation on the y axis. This would involve a bit of thought, I assume, somehow combining the y = z... and y = x... readings into one equation.

My problem is that this is meant to be a calculation for experimental untested EMs, not known ones. I am using known ones to get the formula correct.

blogfast25 - 12-5-2016 at 09:03

It's probably easier to test the validity of:

$$D=AX^{1/2}(1+BP_{o})$$

... by calculating D for some known HEs, where D, X, A, B and P0 are known: plug in the X, A, B and P0 values and see if the calculated D values relate to the tabled D values.

[Edited on 12-5-2016 by blogfast25]

Eosin Y - 12-5-2016 at 09:45

That's what I tried to do for RDX, though I can't find any proper values for X/delta. That might be my problem. Can you find these values anywhere?
blogfast25 - 12-5-2016 at 11:01

 Quote: Originally posted by Eosin Y That's what I tried to do for RDX, though I can't find any proper values for X/delta. That might be my problem. Can you find these values anywhere?

That question is better asked at the HE section of the forum. HE isn't really main stream chemistry.

Eosin Y - 12-5-2016 at 11:02

Fair enough Blogfast. Once I've drawn a graph, I'll post my results.
Anyone know of any decent graph drawing software?

[Edited on 12-5-2016 by Eosin Y]

blogfast25 - 12-5-2016 at 11:51

 Quote: Originally posted by Eosin Y Fair enough Blogfast. Once I've drawn a graph, I'll post my results. Anyone know of any decent graph drawing software?

Excel does a pretty good job for 2D graphs.

Eosin Y - 12-5-2016 at 13:09

My first equation:
$d_{velocity}=6000d_{density} -3000$
Where d(velocity)=velocity of detonation and d(density)=unpressed density g/cm3.
This is inaccurate, but it's better than that shit equation above. It was worked with a simple Cartesian scatter graph.
My next equation is a Cartesian graph where:
$y_{axis}=v_{detonation}$
$x_{axis}=\Delta H_{bond}^{o}$
I've got the bonds all down, but it will take me ~1 hour to work them out.
If Equation 1=x and Equation 2=y, this will be quite an accurate measurement:
$D_{velocity}=\frac{x+y}{2}$
Or, alternatively:$D_{velocity}=\frac{(6000d_{density}-3000)+y}{2}$
I'll post when I work it out tomorrow.

[Edited on 12-5-2016 by Eosin Y]

[Edited on 12-5-2016 by Eosin Y]

blogfast25 - 12-5-2016 at 16:21

I don't really understand your latest reasoning.

Maybe it will become clear when you post next.

Eosin Y - 12-5-2016 at 22:28

That is just the equation for the graph correlation of VoD and density.
I am also doing an equation for graph correlation of VoD and enthalpy of formation.

aga - 14-5-2016 at 13:13

Finally back to Maths.

OK. My 6 month-old washing machine's brains blew up.
It is kept Outside, so the Warranty is null and void.

Solution: Spend 2 days designing/building an Arduino Uno 'new brain' for the machine.

Did that, and now there are two problems.

Primarily is the Motor Control.
(the second is the particular detergent and foaming which we can ignore for now).

Imagine (or go look at) a Washing machine Drum.

An AC motor hits it with quite a lot of torque when it contains a lot of wet clothes, mostly distributed at the Bottom of the drum.

Begin a Spin cycle.

The Imbalance in the drum causes a HUGE displacement of the position of the machine when the drum spins at 1000 rpm (it jumps 4" to the left)

The Drum has a big concrete weight on top, and is suspended on Big springs, presumably to absorb/counter these effects.

The part i Can control is When the motor fires, even with tacho feedback from the motor to get it slightly more accurate.

An early thought was to fire the motor at 0 then 0+n degrees to try to counter the imbalance, but that did not work, even with an empty drum.

I feel certain there is mathematical solution, possibly involving spinning kinda integrals.

It Oscillates (as a system) so i guess avoiding those would be an objective.

Eosin Y again - 14-5-2016 at 13:23

So the motor spins the drum and the system?
Does the rhythm of the shaking of the drum flow with the turns of the motor, and how many degrees is the angle of shaking from the point E where point E=the point exactly at the centre of the drum?
The motor should probably fire at highest speed when the clothes within it are in the middle of dropping to the bottom, meaning that the weight at the bottom will not cause so much deviation from the prescribed course.
If it is spinning at 1000rpm, that's 60/1000=1 rev per 0.06 secs. Given that the clothes probably stick for 1/3 of the circumference (for 0.02 secs) before dropping down and exerting their full momentum (0.01 secs) and repeat this cycle again, I'd probably say make the motor fire in a sequence like the following (each stage taking 0.01 secs) - low torque - low torque - high torque etc. I'd also reinforce the frame a bit, and perhaps get some bigger springs?

It's only 6 months old, which is a great loss. From my medical experience, the foaming at the mouth and the dizziness/imbalance would say rabies perhaps. It's cruelty to children to keep it outside! Baby B (for Bosch) all over again.

[Edited on 14-5-2016 by Eosin Y again]

aga - 14-5-2016 at 13:35

Close with Bosch, very close: it's a Spanish 'Balay' model.

If i remember i'll post photos tomorrow (dark here now).

One idea was to 'tumble' the clothes-mass to get it to distribute more evenly.
It doesn't.
The wet clothes stay at the bottom.

Washing machine technology is seriously more involved than i ever would have imagined.

aga - 14-5-2016 at 14:47

Guess it's too hard a mathematical problem then.

I thought so too.

### Flow of a fluid between parallel plates:

blogfast25 - 15-5-2016 at 08:25

This is an interesting problem because of how the differential equation is set up.

We have two very large parallel plates, both stationary. Between them a Newtonian fluid flows in one direction. From prior art we can expect the velocity profile u(y) to look like this:

Now we consider a slice of fluid with thickness Δy:

To derive u(y) we first note that there is no acceleration, only uniform motion:

$$\frac{\partial u}{\partial t}=0$$

This means acc. Newton's second law that the balance of forces acting on a slice of moving fluid of thickness Δy must be zero::

$$\Sigma F_x=0$$

The forces acting on the slice are:

1. P<sub>1</sub>ΔyW and P<sub>2</sub>ΔyW. This pressure difference is of course the driving force for the flow.

2. Two shear forces (top and bottom): LWσ(y) and LWσ(y+Δy).

The balance of forces is:

$$P_1\Delta y W-P_2\Delta y W+LW[\sigma(y+\Delta y)-\sigma(y)]=0$$

Rearranged slightly:
$$\frac{\Delta P}{L}=-\frac{\sigma(y+\Delta y)-\sigma(y)}{\Delta y}$$
Take the limit to get a derivative:
$$\frac{\Delta P}{L}=-\lim_{\Delta y \to 0}\frac{\sigma(y+\Delta y)-\sigma(y)}{\Delta y}$$

$$\frac{\Delta P}{L}=-\frac{d\sigma}{dy}$$
The shear stress for a Newtonian fluid is:
$$\sigma=\mu\frac{du}{dy}$$
Plugged in we get:
$$\frac{\Delta P}{L}=-\mu\frac{d^2u}{dy^2}$$
This is a simple second order differential equation which on integration gives:
$$u=-\frac{\Delta P}{2\mu L}y^2+c_1y+c_2$$
c<sub>1</sub> and c<sub>2</sub> are integration constants, the values of which are obtained by applying the following boundary conditions:
$$y=-\frac{h}{2} \implies u=0, y=+\frac{h}{2} \implies u=0$$
Plugging in the values for c<sub>1</sub> and c<sub>2</sub> we get:
$$u=\frac{\Delta Ph^2}{2L\mu}\Big[\frac14-\Big(\frac{y}{h}\Big)^2\Big]$$
For y = 0, we get:
$$u_{max}=\frac{\Delta Ph^2}{8L\mu}$$
For a infinitely long plates we can optionally write:
$$\frac{\Delta P}{L}=\frac{\partial P}{\partial x}$$
Now we need to find the average velocity
$$\bar{u}$$
from:
$$\bar{u}=\frac{1}{h}\int_{-h/2}^{+h/2}u(y)dy$$
This yields:
$$\bar{u}=\frac{\Delta Ph^2}{12L\mu}$$
And so with a substitution:
$$\large{u(y)=6\bar{u}\Big[\frac14-\Big(\frac{y}{h}\Big)^2\Big]}$$

[Edited on 15-5-2016 by blogfast25]

blogfast25 - 16-5-2016 at 09:50

Derivation of polynomials

Derivatives, differentials and differentiation

More rules for derivation (and differentiation)

Combining the rules and carrying out substitutions

When a derivative becomes zero (optima)

Optimisation problems

Integration (“anti-derivation”)

Basic rules of integration (indefinite integrals)

Integration by parts

The definite integral

Integration between two boundaries

Surface are under a function’s curve

Integration with Wolfram Alpha’s DSolve function

Simple differential equations

Train stopping problem

Hot Coffee: no need to blow on it!

Syphon: tank emptying time

Hydrogen generator (student problem)

Projectile velocity problem

Partial derivatives

Multi-variate optima

Famous second order DEs

Simple Harmonic Oscillator

The Schrödinger Equation

The Heat Equation

Experimental determination of heat conductivity k

Flow between two parallel plates

### WiFi woes?

blogfast25 - 18-5-2016 at 12:53

The field strength of a WiFi signal in a house is governed by the Helmholtz Equation (here in two dimensions):

$$\nabla^2E+\frac{k^2}{n^2}E=f(x,y)$$

Where E is the signal strength, k the wave number of the used radiation and n the refractive index of the (x,y) space to that radiation. f(x,y) is the source function of the radiation.

$$\nabla^2E=\frac{\partial^2E}{\partial x^2}+\frac{\partial^2E}{\partial y^2}$$

If the (x,y) space is sub-divided into:

$$N\times M$$

... grid points, then the signal strengths can be calculated from a giant system of equations of the form:

$$\frac{E(i+1,j)+E(i-1,j)-2E(i,j)}{\Delta x^2}+\frac{E(i,j+1)+E(i,j-1)-2E(i,j)}{\Delta y^2}+\frac{k^2}{n(i,j)^2}E(i,j)=f(i,j)$$

i and j are the index numbers of the grid points.

Here's a fellow who did just that (and more!)

Look at the complicated room plan, the position of the (red point) WiFi source and the tendrils of 'internet goodness' as they snake through the available space!

The link also points to a related Android app by the same author.

aga - 18-5-2016 at 13:10

The plot looks nice.

A overlaid plot of the signal in the reverse direction would be interesting.

(internet, as with all meaningful communications, is a two-way thing).

blogfast25 - 18-5-2016 at 13:40

I wouldn't know about that: I'm IT averse.

### Second order DEs (continued):

blogfast25 - 19-5-2016 at 12:14

We've seen a few examples of 2nd order DEs, now let's have a slightly more systematic glimpse into simple equations of the form:
$$ay''+by'+cy=0 \:\text{where}\:y=f(x)$$
These are known as 2nd order linear homogeneous DEs (with constant coefficients).

We're obviously looking for a solution function that doesn't really change form even after two derivations.

We propose something like (where the suffix p stands for 'particular'):
$$y_p=e^{\lambda x}$$
Derive:
$$y_p'=\lambda e^{\lambda x}=\lambda y_p$$
and again:
$$y_p''=\lambda^2 e^{\lambda x}=\lambda^2y_p$$
Plug these into the original DV:
$$a\lambda^2y_p+b\lambda y_p+cy_p=0$$
The yp drop out and we're left with:
$$a\lambda^2+b\lambda +c=0$$
This is known as the Characteristic Equation. As a quadratic equation it suggests there are two λ meeting that condition:

Example:
$$y''-y'-6y=0\:\text{where}\:y=f(x)$$
With boundary conditions:
$$y(0)=0,y'(0)=5$$
Characteristic equation:
$$\lambda^2-\lambda-6=0$$
which has two Real roots:
$$\lambda=+2, \lambda=-3$$
A theorem (which will remain untreated here) now tells that the Good solution of the DE is a linear combination, as follows:
$$y=c_1e^{2x}+c_2e^{-3x}$$
To prove this works, let's find the integration constants c1 and c2 from the boundary conditions:
$$y(0)=c_1+c_2=0$$
and:
$$y'=2c_1e^{2x}-3c_2e^{-3x}$$
$$y'(0)=2c_1-3c_2=5$$
Together these equations now yield:
$$c_1=+1,c_2=-1$$
So the full solution of the original DE is:
$$y=e^{2x}-e^{-3x}$$
You can now prove the validity of this solution by plugging it into the original DV.
<hr>
That was all kind of easy because the roots of the Characteristic Equation were both Real.

Next time we'll see what happens when that's not the case.

[Edited on 19-5-2016 by blogfast25]

aga - 19-5-2016 at 13:06

 Quote: Originally posted by blogfast25 That was all kind of easy

Speak for yourself !

blogfast25 - 19-5-2016 at 13:15

Quote: Originally posted by aga
 Quote: Originally posted by blogfast25 That was all kind of easy

Speak for yourself !

Which part did you find hard?

aga - 19-5-2016 at 14:05

$$y_p=e^{\lambda x}$$
$$y_p'=\lambda e^{\lambda x}=\lambda y_p$$

The e^x bit basically.

Natural logs in general.

blogfast25 - 19-5-2016 at 15:00

 Quote: Originally posted by aga $$y_p=e^{\lambda x}$$ $$y_p'=\lambda e^{\lambda x}=\lambda y_p$$ The e^x bit basically. Natural logs in general.

$$e=2.71828...$$
Example:
$$e^3=(2.71828)^3=20.0855$$
In general:
$$e^x, e^{ax}, e^{\lambda x}$$
... are all simple exponential functions (a and λ are Real numbers).

Derivation rule (chain rule applies here):
$$(e^{\lambda x})'=e^{\lambda x}\times (\lambda x)'=\lambda e^{\lambda x}$$
So, if:
$$y_p=e^{\lambda x}$$
$$y_p'=\lambda e^{\lambda x}=\lambda y_p$$
$$y_p''=\lambda^2 e^{\lambda x}=\lambda^2y_p$$

Natural logarithm: the anti-function of ex:

Say if:
$$\ln a=b$$
Then:
$$e^b=a$$

Example:
$$\ln (20.0855)=3$$
Because:
$$e^3=20.0855$$

[Edited on 19-5-2016 by blogfast25]

aga - 19-5-2016 at 15:20

Bollocks! That sodding Chain Rule !

So, if i can ever get even close to 'getting it'. the function of x is
$$\lambda x$$

and the function of the function of x is

$$e^{\lambda x}$$

hence, following derivative chain rule :

$$(e^{\lambda x})'=e^{\lambda x}\times (\lambda x)'$$

Why is it not a Single un-chained function of x, where

$$f(x) = (e^{\lambda x})$$

?

Edit:

Is it as simple as the fact that x gets times by lambda = one function, then raising 'e' by the result of that function constitues another function ?

[Edited on 19-5-2016 by aga]

blogfast25 - 19-5-2016 at 16:58

 Quote: Originally posted by aga Bollocks! That sodding Chain Rule ! So, if i can ever get even close to 'getting it'. the function of x is $$\lambda x$$ and the function of the function of x is $$e^{\lambda x}$$ hence, following derivative chain rule : $$(e^{\lambda x})'=e^{\lambda x}\times (\lambda x)'$$ Why is it not a Single un-chained function of x, where $$f(x) = (e^{\lambda x})$$ ? Edit: Is it as simple as the fact that x gets times by lambda = one function, then raising 'e' by the result of that function constitues another function ? [Edited on 19-5-2016 by aga]

You're basically correct.

The Chain Rule formally is as follows:

If f is a function of g(x), so:

$$f[g(x)]$$

Then:

$$\big[f[g(x)]\big]'=\frac{df(x)}{dx}=\frac{df(g(x))}{dg(x)} \times \frac{dg(x)}{dx}$$

Much shorter:

$$f(g)\:\text{where}\:g=g(x)$$

Then:

$$\frac{df}{dx}=\frac{df(g)}{dg} \times \frac{dg(x)}{dx}$$

In the example at hand:

$$g(x)=\lambda x$$
$$f=e^{g(x)}=e^{\lambda x}$$

It also happens to be that for exponential functions:

$$\frac{d(e^g)}{dg}=e^g$$

For example:

$$\frac{d(e^x)}{dx}=e^x$$

The e-functions are unique in that respect.

So:
$$f'=e^{\lambda x} \times (\lambda x)'= e^{\lambda x} \times \lambda=\lambda e^{\lambda x}$$
<hr>

Tomorrow: another approach to the chain rule. So hold fire, Hombre!

[Edited on 20-5-2016 by blogfast25]

blogfast25 - 20-5-2016 at 08:58

Let’s try and smash those chain gremlins that seem to be wound tightly around your bollocks for once and for all (w/o smashing the bollocks themselves)

Where you wrote:

 Quote: Originally posted by aga So, if i can ever get even close to 'getting it'. the function of x is $$\lambda x$$ and the function of the function of x is $$e^{\lambda x}$$

... you’ve got the right idea. Knowing what to do with the chain rule boils down to identifying the ‘master function’ (f!) and the ‘subordinate’ one (g!). This is of course a metaphor, not to be taken literally.

Then we’ll derive the ‘master’ first, then the ‘subordinate’ one.

But forget about the derivation for a minute. For now we’ll concentrate on what, in an actual function, plays the part of f and what plays the part of g.

Here are some examples:

1.
$$f=\sqrt{x^2+5}$$
$$g=x^2+5$$
$$f(g)=\sqrt{g}$$
2.
$$f=(2\ln x+8)^{1/3}$$
$$g=2\ln x+8$$
$$f(g)=g^{1/3}$$
3.
$$f=e^{3x^2}$$
$$g=3x^2$$
$$f(g)=e^g$$
Exercises: using the same method and format determine f(g) in the following cases.

1.
$$f=\cos(3\sqrt{x}+7)$$
2.
$$f=\ln \Big(\frac{1}{1+x}\Big)$$
3.
$$f=[\cos (2x)+3]^4$$
4.
$$f=\sqrt [5]{1-2x}$$
5.
$$f=\sin\Big(\ln x+\frac{1}{x^2}\Big)$$
6.
$$f=\sqrt [3] {2x^4-x^2-3}$$

[Edited on 20-5-2016 by blogfast25]

blogfast25 - 22-5-2016 at 09:27

aga, are you interested in solving your chain rule problem or did you not see the previous post?
aga - 22-5-2016 at 11:30

sorry. didn't see it. will start now.

(so much random shizzle piles up so fast these days).

[Edited on 22-5-2016 by aga]

aga - 22-5-2016 at 11:40

1.
$$f=\cos(3\sqrt{x}+7)$$
$$g=3\sqrt{x}+7$$
$$f=\cos(g)$$

2.
$$f=\ln \Big(\frac{1}{1+x}\Big)$$
$$g=\frac{1}{1+x}$$
$$f=\ln (g)$$

3.
$$f=[\cos (2x)+3]^4$$
$$g=\cos (2x)+3$$
$$f=g^4$$

4.
$$f=\sqrt [5]{1-2x}$$
$$g=1-2x$$
$$f=\sqrt [5]g$$

5.
$$f=\sin\Big(\ln x+\frac{1}{x^2}\Big)$$
$$g=\ln x+\frac{1}{x^2}$$
$$f=\sin(g)$$

6.
$$f=\sqrt [3] {2x^4-x^2-3}$$
$$g=2x^4-x^2-3$$
$$f=\sqrt [3] g$$

blogfast25 - 23-5-2016 at 07:26

Well, these were all 100 % correct, showing you have no problem seeing which is the 'master' and which is the 'subordinate' function.

To derive we now apply the Chain Rule. For my examples so far we had:

1.
$$f=\sqrt{x^2+5}$$
$$g=x^2+5$$
$$f=\sqrt{g}$$
2.
$$f=(2\ln x+8)^{1/3}$$
$$g=2\ln x+8$$
$$f=g^{1/3}$$
3.
$$f=e^{3x^2}$$
$$g=3x^2$$
$$f=e^g$$
<hr>

The Chain Rule says:
$$\frac{df}{dx}=\frac{df}{dg}\times \frac{dg}{dx}$$
So let's apply it to these examples:

1.
$$\frac{df}{dg}=(\sqrt{g})'=\frac12g^{-1/2}=\frac{1}{2\sqrt{x^2+5}}$$
(Edit: changed 'x' to 'g')
$$\frac{dg}{dx}=(x^2+5)'=2x+0=2x$$
$$\implies \frac{df}{dx}=\frac{df}{dg}\times \frac{dg}{dx}=f'(x)=\frac{2x}{2\sqrt{x^2+5}}=\frac{x}{\sqrt{x^2+5}}$$
2.
$$\frac{df}{dg}=(g^{1/3})'=\frac13 g^{-2/3}=\frac{1}{3g^{2/3}}=\frac{1}{3(2\ln x+8)^{2/3}}$$
$$\frac{dg}{dx}=(2\ln x+8)'=2\frac{1}{x}+0=\frac{2}{x}$$
$$\implies f'(x)=\frac{df}{dg}\times \frac{dg}{dx}=\frac{2}{3x(2\ln x+8)^{\frac23}}$$
3.
$$\frac{df}{dg}=\big(e^g\big)'=e^g=e^{3x^2}$$
$$\frac{dg}{dx}=(3x^2)'=3(x^2)'=3(2x)=6x$$
$$\implies f'(x)=6xe^{3x^2}$$
<hr>
Note that for very simple composite functions of the form (where a is a constant):
$$f(ax)$$
... the chain rule also becomes very simply:
$$f=(ax)^n \implies f'=an(an)^{n-1}$$
$$f=\cos(ax) \implies f'=-a\sin(ax)$$
$$f=\sin(ax) \implies f'=a\cos(ax)$$
$$f=e^{ax} \implies f'=ae^{ax}$$
<hr>
Now smash the chain gremlins and apply the Chain Rule to the previous exercises!

'Cheatsheet':

http://www.ambrsoft.com/Equations/Derivation/Derivation.htm

[Edited on 23-5-2016 by blogfast25]

aga - 23-5-2016 at 10:56

Almost boiled the noodles with this one :
$$\frac{df}{dg}=(\sqrt{x})'=\frac12g^{-1/2}=\frac{1}{2\sqrt{x^2+5}}$$
I am HOPING it should read :
$$\frac{df}{dg}=(\sqrt{g})'=\frac12g^{-1/2}=\frac{1}{2\sqrt{x^2+5}}$$
If not, this rocket mission might not miss Mars, and actually hit it, which would be an environmental disaster.

Assuming a typo, i'll now Baldly go where no Baldy has gone before ...

blogfast25 - 23-5-2016 at 11:44

 Quote: Originally posted by aga Assuming a typo, i'll now Baldly go where no Baldy has gone before ...

AAAAaaaarrghh!!! TERRIBLE typo alert. Harakiri being contemplated now.

[Edited on 23-5-2016 by blogfast25]

aga - 23-5-2016 at 12:02

1.
$$f=\cos(3\sqrt{x}+7)$$
$$f=cos(g)$$
$$g=3\sqrt{x}+7$$
1st derivative should be :
$$(\cos(3\sqrt{x}+7))'.(3\sqrt{x}+7)'$$
$$= -sin(3\sqrt{x}+7).(3x^{\frac 12}+7)'$$
$$= -sin(3\sqrt{x}+7).\frac 32 x^{-\frac 12}$$
Fiddle with just to get sqrt instead of fractional powers
$$= -sin(3\sqrt{x}+7).\frac 3{2 \sqrt x}$$
Then go crazy just to confuse bejeesus out of everyone, including myself :
$$= \frac {-3sin(3\sqrt{x}+7)}{2 \sqrt x}$$

Better pause there for a second to see if it's going OK or has all ballsed up already.

aga - 23-5-2016 at 12:06

 Quote: Originally posted by blogfast25 AAAAaaaarrghh!!! TERRIBLE typo alert. Harakiri being contemplated now.

The Emperor banned seppuku quite some time ago, so you may not.

blogfast25 - 23-5-2016 at 13:53

1. is entirely correct. Well done.

5 to go.

aga - 23-5-2016 at 14:03

Phew!

Beer load a bit high to attempt more right now.
Will certainly mangle the rest tomorrow a.m.

Out of interest, which form did you end up with as the 'correct' answer ?

blogfast25 - 23-5-2016 at 15:32

 Quote: Originally posted by aga . Out of interest, which form did you end up with as the 'correct' answer ?

All last three expressions were 100 % and merely 'synonymous'.

The last one would be my 'aesthetically' preferred one.

Often the preferred version is decided on by what you'll do with it afterwards.. A first derivative is rarely the end of solving a real problem.

aga - 24-5-2016 at 00:09

2.
$$f=\ln \Big(\frac{1}{1+x}\Big)$$
$$g=\frac{1}{1+x}$$
$$f=\ln (g)$$
$$\ln \Big(\frac{1}{1+x}\Big)'.\Big(\frac{1}{1+x}\Big)'$$
$$=(1+x).\Big(\frac{1}{1+x}\Big)'$$
$$\Big(\frac{1}{1+x}\Big)'$$
$$\Big(\frac{1}{1+x}\Big)' = \Big((1+x)^{-1}\Big)' = -1(x+1)^{-2} = \frac {2}{-1(x+1)} = -\frac{2}{x+1}$$
$$g=(x+1), f=\frac 1g$$
$$\Big(\frac{1}{1+x}\Big)'.(x+1)'$$
$$-\frac{2}{x+1}.(x+1) = -\frac {2(x+1)}{x+1} = -2$$