Sciencemadness Discussion Board

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

 Pages:  1    3    5

Darkstar - 14-4-2016 at 06:29

Quote: Originally posted by aga  
If expulsion does get discussed again, may i remind the teaching staff of the modulus of those negatives i still have in safe keeping from the 1992 school cultural visit to Paris.

You know, the ones of yourselves with 'Monsieur Fouetter la Derriere' at madame Fifi's place on the Rue de La Huchette ...


I was only four years old in 1992! Shame on you!

P.S. - Blackmailer!

aga - 14-4-2016 at 10:33

Quote: Originally posted by Darkstar  
I was only four years old in 1992! Shame on you!

P.S. - Blackmailer!

Amazing. In 1992 i was almost exactly $$e^\pi$$

Yes, mail as black as blackest Coal.
Think of expulsion and i'll eat your soul !

Simple Differential Equations:

blogfast25 - 14-4-2016 at 11:22

There exists an entire taxonomy of differential equations, classified by order (first order, second order), linear (or higher degree), homogeneous or not and some special formats (Bernoulli, Clairaut, Legendre etc) but no overarching, uniform algorithm that would solve all of them.

It’s outside of the scope of this basic course to treat this whole characterisation and I’ll limit it to the most simple of first order DEs (we’ll look at some simple and famous second order ones further ahead).

First Order Linear DEs:

The general format is:
$$y'+P(x)y=Q(x)$$
Where:
$$P(x),Q(x)$$
... are both smooth and continuous functions.

1. Either P(x) = 0 or Q(x) = 0 or P(x) = Q(x):

In all three cases the DE becomes separable:

$$P(x)=0$$
$$\implies y'=Q(x)$$
$$\implies \int dy=y=\int Q(x)dx$$
Or:
$$Q(x)=0$$
$$\implies y'+P(x)y=0$$
$$\implies y'=-P(x)y$$
$$\implies \frac{dy}{y}=-P(x)dx$$
$$\implies \int \frac{dy}{y}=-\int P(x)dx$$
$$\implies \ln |y|=-\int P(x)dx$$
Or:
$$P(x)=Q(x)$$
Example:
$$y'+y \sin x=\sin x$$
$$\implies y'=(1-y)\sin x$$
$$\implies \frac{dy}{1-y}=\sin x dx$$
$$\implies \int \frac{dy}{1-y}=\int \sin x dx$$
$$\implies -\ln |1-y|=-\cos x + C$$
2. Integrating factor:

In other cases we can attempt to solve the differential equation:
$$y'+P(x)y=Q(x)$$
... by means of an integration factor.

We define an integrating factor I:
$$I=e^{\int P(x)dx}$$
It can then be shown that:
$$y=\frac{\int I Q(x)dx+C}{I}$$
Example:
$$y'+\frac{3y}{x}=\frac{e^x}{x^3}$$
$$\int \frac{3}{x}dx=3\ln x=\ln x^3$$
$$\implies I=e^{\ln x^3}=x^3$$
$$\implies y=\frac{\int(x^3 \frac{e^x}{x^3})dx+C}{x^3}$$
$$\implies y= \frac{e^x+C}{x^3}$$
Note that using an integrating factor is mo silver bullet because if P(x) is ‘complicated’ then IQ(x)dx in not likely to be analytically integratable.

Good results are often obtained when:
$$P(x)=-\frac{m}{x^n}$$
... where m and n are both positive integers.
<hr>
Exercise:

$$y'+\frac{2y}{x}=\frac{\sin x}{x^2}$$

[Edited on 14-4-2016 by blogfast25]

aga - 14-4-2016 at 13:44

Yikes !

I think i have a note from my mum somewhere.

blogfast25 - 14-4-2016 at 14:24

Perhaps Robo-Integrator suddenly regains some appeal? :D

Next up: some real world examples...

[Edited on 14-4-2016 by blogfast25]

aga - 14-4-2016 at 23:06

OK. All looks fine, right up to the integration factor example, apart from the logs.

Are these general Rules ? :
$$e^{\ln x^n}=x^n$$
$$n\ln x=\ln x^n$$

This step i do not follow at all:-
$$\int \frac{3}{x}dx=3\ln x$$

I was expecting it to be this infinte horror
$$\int \frac 3x dx = 3\int x^{-1}dx = \frac 30$$

Probably best to 'fess up now that that i do not know what logarithms are.

j_sum1 - 15-4-2016 at 03:01

Logarithms are fun!!! You are in for a treat.

And actually, you are probably very familiar with logarithms even if you don't know it. If you can multiply 1000×100,000 in your head by adding three and five, then you are using logs.
The notation is a little bit of a dog when you first encounter it -- seems a bit unintuitive. But it has stuck because it is actually a really practical notation whenever these things come up.

blogfast25 - 15-4-2016 at 06:06

Quote: Originally posted by aga  
OK. All looks fine, right up to the integration factor example, apart from the logs.

Are these general Rules ? :
$$e^{\ln x^n}=x^n$$
$$n\ln x=\ln x^n$$

This step i do not follow at all:-
$$\int \frac{3}{x}dx=3\ln x$$

I was expecting it to be this infinte horror
$$\int \frac 3x dx = 3\int x^{-1}dx = \frac 30$$

Probably best to 'fess up now that that i do not know what logarithms are.


Re. the very last point, if the (natural) logarithm of y is x, so:

$$\ln y=x$$
Then:
$$y=e^x$$
Natural logarithms are the anti-functions of (e-based) exponential functions. Logs only have function values for y > 0 (because [ALWAYS!] ex > 0).

Exception to the power rule of integration:

$$\int x^n dx=\frac{x^{n+1}}{n+1}+C$$
EXCEPT for:
$$n=-1$$
Then:
$$\int x^{-1}dx=\ln x+C$$
Otherwise we get the deadly 'division by zero error'!!!
<hr>
Some useful properties of logs:
$$\ln x^{n}=n \ln x$$
$$\ln (A . B)=\ln A+ \ln B$$
$$\ln \frac{A}{B}=\ln A -\ln B$$
The latter property is commonly used when a determined integral is of the shape:

$$\Delta y=\Big[\ln F(x)\Big]_a^b=\ln F(b)-\ln F(a)=\ln \frac{F(b)}{F(a)}$$



[Edited on 15-4-2016 by blogfast25]

aga - 15-4-2016 at 07:01

Quote: Originally posted by blogfast25  
Exception to the power rule of integration:

$$\int x^n dx=\frac{x^{n+1}}{n+1}+C$$
EXCEPT for:
$$n=-1$$
Then:
$$\int x^{-1}dx=\ln x+C$$

Aha ! Wasn't aware of the exception.

My calculator pukes for both formulae if x = 0, n = -1

Does the 'normal' rule hold true for all other -ve values of n ?

blogfast25 - 15-4-2016 at 07:19

Quote: Originally posted by aga  


Does the 'normal' rule hold true for all other -ve values of n ?


The power rule hold for ALL values of n, including negative ones, EXCEPT for n = -1. Even for values very close to -1 it holds. But NOT for n = -1.

Train stopping problem:

blogfast25 - 15-4-2016 at 13:20

Although this problem can also be solved in a quicker way, using calculus is a nice, simple demonstration of calculus in kinematic problems, so here goes...

A 150-car freight train is approaching Carbondale, Yorkshire at a constant speed of 15 meter per second (approximately 34 mph). As the train nears a railroad crossing, the locomotive engineer sees a car stalled on the tracks. It takes him 4 seconds to react before he applies the brakes. It then takes the train another 1.25 minutes to come to a full stop. Assume that the deceleration of the train is constant while the brakes are being applied.

How far does the train travel from the moment the engineer sees the car until the time the train comes to a full stop?

Schematic:
Train stopping.png - 3kB

Let’s express the basic data in ‘mathspeak’:
$$v_0=15\;\mathrm{m/s}, t_0=4\:\mathrm{s}, t_s-t_0=1.25\:\mathrm{min}=75\:\mathrm{s}$$
We imagine the train to run along a x-axis, pointing in the direction of motion.

Now we take a quick short cut, to calculate the deceleration during the braking period.
$$a=\frac{\Delta v}{\Delta t}=\frac{0-v_0}{t_s-t_0}=-\frac{15}{75}=-\frac15=-0.2\:\mathrm{m/s^2}$$

So the train's velocity is reduced by 0.2 m/s, per second of braking.

The velocity – time function is not smooth and continuous because v suddenly changes at t=4 s. For that reason we’ll ignore what went on before t=4 s, at least for now.

From higher up in the thread we know that:
$$a=\frac{dv}{dt}$$
$$dv=adt$$
$$\int dv=\int adt=a\int dt$$
$$v=-\frac15 t+C$$
Using the boundary condition:
$$t=4, v=15$$
$$\implies 15=-\frac15 \times 4+C$$
$$C=\frac{79}{5}$$
$$\implies v=-\frac15 t+\frac{79}{5}$$
So the v,t function (for t > 4 s) is:
$$v=\frac15(79-t)$$
We also know that
$$v=\frac{dx}{dt}$$
$$dx=vdt$$
To calculate the travelled distance during braking we can apply:
$$\Delta x=\int_4^{79} vdt=\int_4^{79} \frac15 (79-t)dt$$
$$=\frac15\big[79t-\frac12 t^2\big]_4^{79}=562.5\:\mathrm{m}$$
Now we need to add the distance travelled during the 4 seconds before the driver puts on the brakes:
$$4 \times 15=60\:\mathrm{m}$$
So the total distance travelled between the driver noticing the car and full stop is 622.5 m.

[Edited on 15-4-2016 by blogfast25]

aga - 15-4-2016 at 14:39

Wow. I can actually read and follow that !

Some beer cells must still be firing, thanks to your teaching skills.

In the missing steps after this step :
$$\frac15\big[79t-\frac12 t^2\big]_4^{79}$$
does the 1/5 apply to both bits or to the overall result ?

Second thoughts, don't tell me. I'll try it and see, most likely tomorrow and most likely it does apply to both bits.

Edit:

Thinking about it, it doesn't matter either way, same result happens.

[Edited on 15-4-2016 by aga]

blogfast25 - 15-4-2016 at 15:23

Quote: Originally posted by aga  

In the missing steps after this step :
$$\frac15\big[79t-\frac12 t^2\big]_4^{79}$$
does the 1/5 apply to both bits or to the overall result ?



Let's nip that bit of confusion in the bud immediately: 1/5 is a factor and applies to everything between the brackets. So calculate the bit between [ ] brackets first, then multiply by the factor.

Learning to read calculus problems is a already a huge step forward (seriously!) :cool:

[Edited on 15-4-2016 by blogfast25]

aga - 16-4-2016 at 00:53

Damn. I just though i'd gotten all brainy, only to find you're more so.

The logic was that the deceleration period applies only to that one linear chunk, so the boundaries are from 0 to 75, not 4 to 75.

'a' is calculated slightly differently (-ve cos it's decelleration not acceleration)
$$\text a = deceleration = {initial speed/time} = 15/75 = -0.2 = - \frac 15$$
The rest follows just about the same as you did, with interim steps so i don't get (more) confused
$$\int dv = \int adt = a\int dt$$
$$v = - \frac 15 \int dt = -\frac 15 t + C = C - \frac 15 t$$
we know v=0 at time 75s, so
$$0 = C - \frac {75}{5}$$
$$C = 15$$
alternately at time 0, C = v = 15. So now
$$v =15 - \frac 15 t = \frac {75-t}{5} = \frac 15(75-t)$$
therefore from t=0 to t=75
$$\Delta x = \int _0^{75} vdt = \int _0^{75} \frac 15(75-t)dt$$
This is a different integration so another C should appear
$$x=\frac 15 \Big[ 75t - \frac {t^2}{2} +C_2\Big]_0^{75}$$
$$x = \frac 15 \Big( [ (75)75 - \frac {75^2}{2} + C_2 ] - [ (0)75 - \frac {0^2}{2} + C_2] \Big)$$
Happily the subtraction eliminates this new constant
$$=\frac 15 [5625 - 2812.5 + C_2 - C_2] = \frac {2812.5}{5}= 562.5$$
add in the 4 secs @ 15m/s
$$= 562.5 + 60 = 622.5m$$

... exactly the same answer !

In't maffs amazing ?

blogfast25 - 16-4-2016 at 05:31

Quote: Originally posted by aga  

$$= 562.5 + 60 = 622.5m$$

... exactly the same answer !

In't maffs amazing ?


It's totally maff!

Your way is how most would do it, BTW. But I'm an old oddball! :D

One minor comment: when calculating:

$$\Big[\int f(x)dx\Big]_a^b=\Big[F(x)\Big]_a^b=F(b)-F(a)$$

... you don't need to invoke C because we know it will drop out. But what you wrote was mathematically correct nonetheless.

Hot Coffee: no need to blow on it!

blogfast25 - 16-4-2016 at 06:37

So you've just bought yourself a cup of hot, steaming coffee in a flimsy throw away cup with lid. Now the annoyingly inevitable starts: it cools down fairly quickly. In this exercise we'll try and model that cooling.

A few definitions and assumptions:

The coffee of mass m contains heat energy (Enthalpy) Q (J). Coffee has a specific heat capacity cp (J/kg K).

Heat loss (cooling) is through convective loss to the surrounding air (radiative losses are considered small at < 100 C).

Temperature of the coffee is more or less uniform throughout the cup.

In those circumstances Newton's cooling law tells us that:
$$-\frac{dQ}{dt}\propto A(T-T_a)$$
... where dQ/dt is the rate of heat loss energy, A is the total surface area of the cup, T is the temperature of the coffee and Ta the ambient temperature (which is presumed constant). The negative sign is needed because dQ < 0 (it's a LOSS).

We can turn this into an identity by means of a proportionality constant h:
$$ \frac{dQ}{dt}=-hA(T-T_a)$$
h (W/K m2) is known as the Heat Transfer Coefficient. It's specific to each heating/cooling problem (it's not a universal constant). (in a different context, double glazing people often refer to it as the "K-factor").

Thermodynamics also tells that when an object of mass m with specific heat capacity cp changes in temperature it's heat content also changes acc.:

$$\Delta Q=mc_p\Delta T$$
By limit taking we can convert this into a differential equation:
$$\lim_{\Delta T \to 0}\frac{\Delta Q}{\Delta T}=\frac{dQ}{dT}=mc_p$$
$$\implies dQ=mc_pdT$$
Inserting this into the second equation above we get:
$$mc_p\frac{dT}{dt}=-hA(T-T_a)$$
Or:
$$\frac{dT}{dt}=-\frac{hA}{mc_p}(T-T_a)$$
Now we call ('tau'):
$$\tau=\frac{hA}{mc_p}$$
$$\frac{dT}{dt}=-\tau (T-T_a)$$
$$\frac{dT}{T-T_a}=-\tau dt$$
Because:
$$d(T-T_a)=dT-0=dT$$
$$\implies \frac{d(T-T_a)}{T-T_a}=-\tau dt$$
We can now integrate both sides directly, using the boundary conditions:
$$(t=0, T=T_i),(t, T)$$
... where Ti is the initial temperature of the coffee and T the temperature after some time t, so:
$$\int_{T_i}^{T}\frac{d(T-T_a)}{T-T_a}=-\int_0^t\tau dt$$
Remembering the properties of logs ( ;) ), we get:
$$\big[\ln(T-T_a)\big]_{T_i}^{T}=-\tau t$$
$$\ln \Big[\frac{T-T_a}{T_i-T_a}\Big]=-\tau t$$
$$\frac{T-T_a}{T_i-T_a}=e^{-\tau t}$$
$$\large{T=T_a+(T_i-T_a)e^{-\tau t}}$$
The temperature thus evolves as follows (schematic):

Temperature evolution.png - 3kB

Evaluate (qualitatively):

1. The time needed to reach Ta.
2. The influence of h, A, m and cp on the cooling process.


[Edited on 16-4-2016 by blogfast25]

aga - 16-4-2016 at 09:19

Quote: Originally posted by blogfast25  
... you don't need to invoke C because we know it will drop out.

You might know that, but for me, only having seen C a matter of minutes ago, i felt it important to remember that it does appear then drop out.

That working-out/post is also intended to be useful for me to refer back to.

blogfast25 - 16-4-2016 at 09:25

Quote: Originally posted by aga  

You might know that, but for me, only having seen C a matter of minutes ago, i felt it important to remember that it does appear then drop out.

That working-out/post is also intended to be useful for me to refer back to.


I am a maff-nerd and I endorse those messages! :)


[Edited on 16-4-2016 by blogfast25]

aga - 16-4-2016 at 09:34

Quote: Originally posted by blogfast25  
Evaluate (qualitatively):

1. The time needed to reach Ta.
2. The influence of h, A, m and cp on the cooling process.

Erm, the 'qualitatively' part knocked me sideways
(my fall being broken by a rather large pile of empty beer cans, so no lasting damage)

What does the question mean ?

Come up with an equation that :-

1. predicts the time needed to reach Ta starting from an abitrary time T ?

2. re-arrange said equation into other equations so h, A, m and cp respectively are on the other side ?

Edit:

You ain't fooling nobody : tau is u in disguise, trying to sneak in via the back door.

[Edited on 16-4-2016 by aga]

blogfast25 - 16-4-2016 at 11:43

Quote: Originally posted by aga  

Erm, the 'qualitatively' part knocked me sideways
(my fall being broken by a rather large pile of empty beer cans, so no lasting damage)

What does the question mean ?

Come up with an equation that :-

1. predicts the time needed to reach Ta starting from an abitrary time T ?

2. re-arrange said equation into other equations so h, A, m and cp respectively are on the other side ?

Edit:

You ain't fooling nobody : tau is u in disguise, trying to sneak in via the back door.

Qualitatively means: without actual numbers or calculation.

How long for the coffee to completely cool to Ta?

How do m, cp, A and h affects cooling rate? Increase? Decrease? No influence?

I knew I should have chosen kappa instead of tau!

Tomorrow: aga's syphon!

[Edited on 16-4-2016 by blogfast25]

aga - 16-4-2016 at 12:41

Quote: Originally posted by blogfast25  
Qualitatively means: without actual numbers or calculation.

How long for the coffee to completely cool to Ta?

Great !

So for the coffee to cool to Ta it will take a little while.

For larger cups, it will take little bit longer.

As-per definition perhaps, although i suspect that's not the answer required.

Heigh-ho. More algebra in the morning.

Oh. aga's syphon can be observed, measurements taken, even calculated, but absolutely no touching or photographs.

aga - 17-4-2016 at 07:13

Recording the temperature of the first coffee of the day over 600 secs came up with some data that enabled a heat transfer coefficient (h) of 0.0463 for this system (i.e. this particular cup of coffee) to be guestimated with a spreadsheet and a bit of successive approximation..

Most cups are basically a cone with the top chopped off, then inverted.

The volume of the cup is equal to the volume of the full cone less that of the smaller chopped off cone, same goes for the area, although the area of the bottom must be added.

Cone volume/area are given by
$$V=\pi r^2 \frac h3$$
$$A = \pi r (r +\sqrt{h^2 r^2})$$
Let (in millimetres)
ht = cup height
dt = diameter of the top of the cup
db = diameter of the bottom of the cup
Compute the volume and area of the cup (these bits took hours !) :-
$$mm^3 = \pi h_t \frac {d_t^3 - d_b^3}{12d_t-12d_b}$$

$$mm^2 = \pi \frac{d_t}{2} \Bigg( \frac {d_t}{2} + \sqrt { \Big(\frac {h_t d_t}{d_t-d_b} \Big)^2 + \frac {d_t^2}{4} } \Bigg) - \pi \frac{d_b}{2} \Bigg ( \frac {d_b}{2} + \sqrt { \Big(\frac {h_t d_b}{d_t-d_b} \Big)^2 + \frac {d_b^2}{4} } \Bigg) + \pi \frac {d_b^2}{4}$$

THIS cup has the measurements :-
ht = 85mm
dt = 95mm
db = 70mm

So, it has a volume of 457,854 mm<sup>3</sup> = 458 ml and an area of 29,355mm<sup>2</sup> = 0.0294m<sup>2</sup>

It also went cold quote some time ago.

I'll get a beer instead and then have a go at the actual questions.

[Edited on 17-4-2016 by aga]

aga - 17-4-2016 at 07:51

Quote: Originally posted by blogfast25  

Evaluate (qualitatively):

1. The time needed to reach Ta.
2. The influence of h, A, m and cp on the cooling process.

1.Mathematically the coffee will never reach ambient temperature (i.e. inifinite time).

In practice it reaches room temperature shortly before you finish doing whatever distracted you from drinking it hot (see above !)

2. less mass (m) = quicker coooling
less specific heat capacity (cp) = quicker cooling
less area (A) = slower cooling
less heat transfer coefficient (h) = slower cooling

[Edited on 17-4-2016 by aga]

blogfast25 - 17-4-2016 at 08:07

@aga:

Well, well.

Decided to inject some experimentalism into it? Good!

I agree with your value of V but for A I get 0.0568 m2. I need to check that value, though. Did you take into account the surface area of the top and bottom?

I'm curious to see your data and how you will derive your estimate of h from them. :cool: I know how I would.

[Edited on 17-4-2016 by blogfast25]

blogfast25 - 17-4-2016 at 08:10

Quote: Originally posted by aga  
Quote: Originally posted by blogfast25  

Evaluate (qualitatively):

1. The time needed to reach Ta.
2. The influence of h, A, m and cp on the cooling process.

1.Mathematically the coffee will never reach ambient temperature (i.e. inifinite time).

In practice it reaches room temperature shortly before you finish doing whatever distracted you from drinking it hot (see above !)

2. less mass (m) = quicker coooling
less specific heat capacity (cp) = quicker cooling
less area (A) = slower cooling
less heat transfer coefficient (h) = slower cooling

[Edited on 17-4-2016 by aga]


All present and correct. 100/100. :cool:

aga - 17-4-2016 at 08:27

Quote: Originally posted by blogfast25  
Did you take into account the surface area of the top and bottom?

I'm curious to see your data and how you will derive your estimate of h from them. :cool: I know how I would.

Erm, i added the area of the middle bit to the last bit but not the other bit, so it could be a way out.

It wasn't clear whether that formula for 'area of a cone' was the entire cone. I assumed it was.

Raw data:-

Secs deg C
0 62
60 60
120 57
180 56
240 55
300 54
360 53.5
420 52
480 50.5
540 49
600 48

I just set the equation up in a spreadsheet, used the calculated values (also the s.h.c. of water @ 4.186) and tried 'h' numbers until the result roughly agreed with the experimental result.

Quicker for me that way.

blogfast25 - 17-4-2016 at 08:53

Quote: Originally posted by aga  

I just set the equation up in a spreadsheet, used the calculated values (also the s.h.c. of water @ 4.186) and tried 'h' numbers until the result roughly agreed with the experimental result.

Quicker for me that way.


The scientific way of doing this would be as follows.

Remember that:
$$\ln \Big[\frac{T-T_a}{T_i-T_a}\Big]=-\tau t$$

You would plot in Excell:

$$\ln \Big[\frac{T-T_a}{T_i-T_a}\Big]$$

versus:

$$t$$

That should give something looking like:

line fitted.png - 3kB

The + are the data points, they should roughly be on a straight line. Then make Excell fit a line to the data (linear regression).

The slope of the line is:

$$-\tau$$

Then calculate h from tau.

aga - 17-4-2016 at 10:46

All day reviving algebra cells did not leave any brain capacity to learn what a linear regression was.

What does a second or third order integrally equation look like ?

blogfast25 - 17-4-2016 at 11:53

Checking surface area of the cup, by calculus.

For a revolution body:

Revolution body.png - 3kB

... the surface area A (end bits not counted) is given by:
$$A=2\pi\int_a^bf(x)\sqrt{1+[f'(x)]^2}dx$$
For the cup, with an x-axis running through it horizontal centre axis:
$$f(x)=\frac{5}{17}x+70$$
$$f'(x)=\frac{5}{17}$$
$$A=2\pi\int_0^{85}\sqrt{1+\frac{5^2}{17^2}}(\frac{5}{17}x+70)dx$$
$$A=2.085\pi\Big[\frac{5}{34}x^2+70x\Big]_0^{85}=45927$$
Lid:
$$\frac{\pi}{4}95^2=7088$$
Cone + lid:
$$53015\:\mathrm{mm^2}=0.053\:\mathrm{m^2}$$

Quote: Originally posted by aga  
All day reviving algebra cells did not leave any brain capacity to learn what a linear regression was.

What does a second or third order integrally equation look like ?




If the first derivative is f'(x):

$$f'(x)=\frac{df(x)}{dx}$$

Then the second derivative is f''(x):

$$f''(x)=\frac{df'(x)}{dx}=\frac{f^2(x)}{dx^2}$$

$$y'''=\frac{d(y'')}{dx}=\frac{d^3y}{dx^3}$$

Example:

$$m\frac{d^2y}{dt^2}=mg-ky$$
or:
$$my''=mg-ky$$

Newtonian notation ('overdot notation'):
$$m\ddot{y}=mg-ky$$

... is the DE of motion of a bob of mass m hanging off a spring with spring constant k.

[Edited on 18-4-2016 by blogfast25]

aga - 17-4-2016 at 12:50

Quote: Originally posted by blogfast25  
$$m\frac{d^2y}{dt^2}=mg-ky$$

Is 'g' gravitational acceleration ?

Must be, seeing as it popped out of nowhere ;)

You do realise that i'll soon be able to calculate proof for agaspace ...

Well, maybe if i can finally master those nasty fractions, do 'u' substitutions, drink less, think straight etc.

blogfast25 - 17-4-2016 at 13:39

Quote: Originally posted by aga  
Quote: Originally posted by blogfast25  
$$m\frac{d^2y}{dt^2}=mg-ky$$

Is 'g' gravitational acceleration ?



Yes. The bob is subject to it's own weight:

$$mg$$

aga - 17-4-2016 at 14:07

Of course, same as everything in agaspace, including Time : all attributes are inseparable.
$$g' = \Sigma \int all o' t'otherbits$$
Still regard these higher equations as 'best fit' or 'best we have found so far' mostly due to things like Limit Theorem : it's all basically an approximation, although a damned good one.

[Edited on 17-4-2016 by aga]

blogfast25 - 17-4-2016 at 15:06

@aga:

I happen to know that for agaspace you need partial derivatives:

For a function f of x AND y:
$$f(x,y)$$
Partial derivative to x:
$$\frac{\partial f}{\partial x}$$
... and to y:
$$\frac{\partial f}{\partial y}$$

You can't calculate agaspace astral mass time differential tensors w/o them! :)

But we don't need them for agasyphonTM, so we'll stick to the latter, tomorrow.

[Edited on 17-4-2016 by blogfast25]

blogfast25 - 18-4-2016 at 04:58

Here's the plot for:

$$\ln \Big[\frac{T-T_a}{T_i-T_a}\Big]=-\tau t$$

$$\Big[\frac{T-T_a}{T_i-T_a}\Big]$$

... is also called the "Reduced Temperature", a dimensionless number between 1 and 0.

I used Ta=20 C.

Reduced temperature.png - 9kB

The linear regression equation:

$$y=-0.0006x-0.021$$

... gives us an estimate for:

$$\tau=0.0006\:\mathrm{s^{-1}}$$
$$\tau=\frac{hA}{mc_p}$$

With A=0.053 m2, m=0.458 kg, cp=4181 J/kg K then:

$$h=\frac{\tau mc_p}{A}=22\:\mathrm{Wm^{-2}K^{-1}}$$

Considering there's some noise on the data, this is a crude estimate, of course.

This source puts up a value range of 5 to 37 Wm-2K-1 for free convection in gas (air) or dry vapour, so we're in the right ball park.

[Edited on 18-4-2016 by blogfast25]

aga - 18-4-2016 at 09:08

22 ?

Doh. I was very uncertain of the Units, so perhaps i got metres/millimetres mixed up somewhere.
$$f(x,y,z)$$
now that would definitely come in handy.
Quote:
astral mass time differential tensors

They sound very cool !

What colour are they ?

blogfast25 - 18-4-2016 at 09:14

Quote: Originally posted by aga  
22 ?

Doh. I was very uncertain of the Units, so perhaps i got metres/millimetres mixed up somewhere.
$$f(x,y,z)$$
now that would definitely come in handy.
Quote:
astral mass time differential tensors

They sound very cool !

What colour are they ?


Perhaps the most common f(x,y,z) type function is the volume of a right angled box:

$$V=lhw$$

They're appleblueseagreen.

In a couple of hours: calculus of the agasyphonTM. Yeehaw!

aga - 18-4-2016 at 10:45

Quote: Originally posted by blogfast25  


Perhaps the most common f(x,y,z) type function is the volume of a right angled box:
$$V=lhw$$

Volume ! Of course !

So if the function f(x,y,z) is simply xyz, then f'(x,y,z) is one of the missing links with t ! (and E, maybe g as well)

Syphon: tank emptying time

blogfast25 - 18-4-2016 at 11:39

Syphon problem.png - 8kB

The tank's shape is of no consequence as long as its cross-section A is constant.

The outflow speed v2 can be determined by applying Bernoulli's Principle between points 1 and 2:
$$\frac12 v_2^2+gy_2+\frac{p_2}{\rho}=\frac12 v_1^2+gy_1+\frac{p_1}{\rho}$$
The derivation is a bit lengthy, so I've posted it below the second page break.

The result is:
$$v_2=c\sqrt{2gy}$$
So the volumetric throughput Qv is:
$$Q_v=\frac{\pi}{4}D^2v_2=\frac{\pi}{4}D^2c\sqrt{2gy}$$

During an infinitesimal amount of time dt, the water level decreases by dy (<0), so:
$$dV=-Ady=Q_vdt$$
$$-Ady=\frac{\pi}{4}D^2c\sqrt{2hy}dt=\frac{\pi}{4}D^2c\sqrt{2g}\sqrt{y}dt$$
Let's call:
$$\alpha=\frac{\pi D^2c\sqrt{2g}}{4A}$$
$$-y^{-1/2}dy=\alpha dt$$
Integrate between relevant boundaries:
$$-\int_H^{h_0}y^{-1/2}dy=\int_0^t \alpha dt$$
$$2\big[\sqrt{y}\big]_{h_0}^H=\alpha t$$
$$t=\large{\frac{2}{\alpha}(\sqrt{H}-\sqrt{h_0})}$$
Note that the higher up the tank is placed with respect to 0, the smaller t becomes.
<hr>
But. There's a big but.

The model above doesn't take into account any viscous losses in the syphon's pipe.

To take them into account, with Bernoulli, we get:
$$\frac{1}{2c^2} v_2^2= gy-\frac{\Delta p_s}{\rho}$$
For laminar flow (turbulent flow makes it more complicated) through the pipe:
$$\Delta p_s=\frac{32 \mu L v_2}{D^2}$$
Where:
$$L \approx 2(H-h_0)+h_0$$
Substituting we get:
$$\frac{1}{2c^2} v_2^2= gy-\frac{32 \mu L v_2}{\rho D^2}$$
$$\frac12 v_2^2+\beta v_2-c^2gy=0$$
With:
$$\beta=\frac{32 \mu L c^2}{\rho D^2}$$
This quadratic equation has one positive root:
$$v_2=-\beta+\sqrt{\beta^2+2c^2gy}$$
So:
$$Q_v=\frac{\pi}{4}D^2v_2=\frac{\pi}{4}D^2(\sqrt{\beta^2+2c^2gy}-\beta)$$
Inserting into the DV above the break:
$$-\int_H^{h_0}\frac{dy}{\sqrt{\beta^2+2c^2gy}-\beta}=\int_0^t \alpha dt$$
Where:
$$\alpha=\frac{\pi D^2c}{4A}$$
Although that integral is computable, the result gets very bulky and messy, so I won't go there.
<hr>
Full derivation:
$$\frac12 v_2^2+gy_1+\frac{p_2}{\rho}=\frac12 v_1^2+gy_2+\frac{p_1}{\rho}$$
$$\frac12 (v_2^2-v_1^2)+\frac{p_0}{\rho}=gh_0+\frac{p_1}{\rho}$$
$$A_2v_2=Av_1$$
$$\implies v_2^2-v_1^2=v_2^2\Big[1-\Big(\frac{A_2}{A}\Big)^2\Big]$$
$$A_2=\frac{\pi}{4}D^2$$
$$\frac{1}{c^2}=[1-\Big(\frac{A_2}{A}\Big)^2\Big]$$
$$\frac{1}{2c^2}v_2^2+\frac{p_0}{\rho}=gh_0+\frac{p_1}{\rho}$$
$$p_1=\rho g(y-h_0)+p_0$$
$$\frac{1}{2c^2} v_2^2= gy$$
$$v_2=c\sqrt{2gy}$$
$$Q_v=\frac{\pi}{4}D^2v_2=\frac{\pi}{4}D^2c\sqrt{2gy}$$
$$dV=-Ady=Q_vdt$$
$$-Ady=\frac{\pi}{4}D^2c\sqrt{2hy}dt=\frac{\pi}{4}D^2c\sqrt{2g}\sqrt{y}dt$$
$$\alpha=\frac{\pi D^2c\sqrt{2g}}{4A}$$
$$-y^{-1/2}dy=\alpha dt$$
$$-\int_H^{h_0}y^{-1/2}dy=\int_0^t \alpha dt$$
$$2\big[\sqrt{y}\big]_{h_0}^H=\alpha t$$
$$t=\large{\frac{2}{\alpha}(\sqrt{H}-\sqrt{h_0})}$$




But.
$$\frac{1}{2c^2} v_2^2= gy-\frac{\Delta p_s}{\rho}$$
$$\Delta p_s=\frac{32 \mu L v_2}{D^2}$$
$$L \approx 2(H-h_0)+h_0$$
$$\frac{1}{2c^2} v_2^2= gy-\frac{32 \mu L v_2}{\rho D^2}$$
$$\frac12 v_2^2+\beta v_2-c^2gy=0$$
$$\beta=\frac{32 \mu L c^2}{\rho D^2}$$
$$v_2=-\beta+\sqrt{\beta^2+2c^2gy}$$
$$Q_v=\frac{\pi}{4}D^2v_2=\frac{\pi}{4}D^2(\sqrt{\beta^2+2c^2gy}-\beta)$$
$$-\int_H^{h_0}\frac{dy}{\sqrt{\beta^2+2c^2gy}-\beta}=\int_0^t \alpha dt$$
$$\alpha=\frac{\pi D^2c}{4A}$$

[Edited on 19-4-2016 by blogfast25]

aga - 19-4-2016 at 01:34

Cor Blimey !

I think a bit of commentary is going to be required to follow that properly !

blogfast25 - 19-4-2016 at 05:44

Quote: Originally posted by aga  
Cor Blimey !

I think a bit of commentary is going to be required to follow that properly !


Ok. Briefly.

Often the preamble necessary to set up the DV is longer and harder work than actually solving the DV: that was definitely the case here.

The actual DV:

$$dV=-Ady=Q_vdt$$

... is obtained by looking at an emptying tank during an infinitesimally small t+dt time interval. In that time, a volume:

$$Q_vdt$$
Is discharged through the syphon. That causes the level in the tank to drop by -dy or a volume dV:

$$dV=-Ady$$

So:

$$-Ady=Q_vdt$$

Then it's a matter of plugging in Qv, rearranging and integrating to get the tank's emptying time t.


Now look at:

$$Q_v(y)=\frac{\pi}{4}D^2c\sqrt{2gy}$$

This implies something anyone with a passing acquaintance of syphons will know: the lower you place the outlet (point 2), the higher the throughput!

This is also reflected by:

$$t=\large{\frac{2}{\alpha}(\sqrt{H}-\sqrt{h_0})}$$

Take values of H = 9 and h0 = 4 (tank height is 5).

That gives:

$$t=\frac{2}{\alpha}$$

Now take values of H = 16 and h0 = 11 (tank height is also 5).

That gives:
$$t=\frac{1.37}{\alpha}$$

32 % shorter!

Now for the case where we try and take pipe viscous losses into account:

$$Q_v=\frac{\pi}{4}D^2(\sqrt{\beta^2+2c^2gy}-\beta)$$
$$\beta=\frac{32 \mu L c^2}{\rho D^2}$$
If you look closely at that function, it appears that L on the one hand increases Qv, on the other hand it seems to decrease it.

Could there be an optimum L?

We can find this by Optimum Theory, by evaluating:

$$\frac{dQ_v}{dL}=0$$

I did this and found no optimum. That's good news because it means that as in the simpler 'no pipe friction' case, the lower the syphon outlet is, the higher the output and the smaller the emptying time (there exists no optimum L beyond which that statement is no longer true).

The formula:

$$t=\large{\frac{2}{\alpha}(\sqrt{H}-\sqrt{h_0})}$$

... can be used for a lower limit estimate of the emptying time, bearing in mind that due to losses in the syphon the real emptying time will always be somewhat higher.
<hr>
Next up (20.00 h UTC): a CHEMICAL example, with 'student participation' (euphemism alert).

[Edited on 19-4-2016 by blogfast25]

aga - 19-4-2016 at 08:09

Jeez. All that algebra is seriously heavy stuff.

Are all the students going to draw lots to decide who does the experiment(s) ? ;)

blogfast25 - 19-4-2016 at 09:35

Quote: Originally posted by aga  

Are all the students going to draw lots to decide who does the experiment(s) ? ;)


Of course. But I've got some Darwins on a dead cert! :D

Re. the algebra, the next one is much lighter on it. :)

[Edited on 19-4-2016 by blogfast25]

Hydrogen generator: (student problem)

blogfast25 - 19-4-2016 at 12:18

Hydrogen generator.png - 6kB

In the hydrogen gas generator above, a (constant) volume V of dilute hydrochloric acid of initial concentration c0 reacts with zinc granules acc.:

Zn(s) + 2 HCl(aq) === > ZnCl2(aq) + H2(g)

We assume the amount of Zn (number of moles) present to be much, much higher than that of HCl and the temperature to be constant. In those circumstances kinetics allows us to write:
$$\frac{dN}{dt}=kc$$
N is the number of moles of hydrogen formed, t is time, k the reaction rate constant and c the hydrogen chloride concentration.

The concentration of HCl is obviously NOT constant, as each mol of hydrogen generated requires 2 mol of HCl to react away. Stoichiometrically we can write:
$$c=\frac{c_0V-2N}{V}$$



We start off at t=0 with N=0.

Develop expressions for:

1. N(t): the number of moles hydrogen generated as a function of time.

2. The rate of hydrogen generation dN(t)/dt as a function of time.

Heigh-ho, heigh-ho!
Off to work you go!
:D

[Edited on 19-4-2016 by blogfast25]

Mini-recap on substitutions and differentiation

blogfast25 - 21-4-2016 at 13:27

Suppose we have an integral of the type:
$$\int \frac{dx}{ax+b}$$
This can't be integrated directly because the stuff behind the d isn't the same as ax+b (differential doesn't match integrand).

To remedy this we try a substitution:

$$u=ax+b$$
Now derive:
$$\frac{du}{dt}=a\frac{dx}{dt}+0=a\frac{dx}{dt}$$
Multiply both sides by dt to obtain the differential:
$$du=adx$$

So:
$$dx=\frac1a du$$
Now substitute:
$$\int \frac{\frac1a du}{u}$$
$$=\frac1a \int \frac{du}{u}$$
Integrate this, then substitute back with u=ax+b.

Why this u-kerfuffle? Well, had we said that:
$$\int \frac{dx}{ax+b}=\ln(ax+b)$$, that would have been incorrect because, if we take the first derivative, with the chain rule:
$$[\ln(ax+x)]'=\frac{1}{ax+b}(ax+b)'=\frac{a}{ax+b}\neq \frac{1}{ax+n}$$
But:
$$[\frac1a \ln(ax+x)]'=\frac1a \times\frac{1}{ax+b}(ax+b)'=\frac1a \times \frac{a}{ax+b}$$
$$[\frac1a \ln(ax+x)]'=\frac{1}{ax+n}$$
... which is correct.
<hr>
Here's a few more examples: remember that derivation and integration are anti-operators.

If:
$$y=\int \cos 3xdx=\frac13 \sin3x+C$$
Then:
$$y'=[\frac13 \sin3x+C]'=\frac13 \times (\sin 3x)'+0$$
$$=\frac13 \times \cos 3x \times (3x)'=\frac13 \times \cos 3x \times 3=\cos 3x$$
If:
$$y=\int(5-x)^6dx=-\frac17(5-x)^7+C$$
Then:
$$y'=[-\frac17(5-x)^7+C]'=-\frac17 \times 7(5-x)^6 \times (5-x)'+0=-(5-x)^6 \times (-1)$$
$$=(5-x)^6$$
If:
$$y=\int e^{3-2x}dx=-\frac12 e^{3-2x}+C$$
Then:
$$y'=[-\frac12 e^{3-2x}+C]'=-\frac12 e^{3-2x} \times (3-2x)'+0$$
$$=-\frac12 e^{3-2x} \times (-2)$$
$$=e^{3-2x}$$

[Edited on 22-4-2016 by blogfast25]

aga - 22-4-2016 at 06:59

This sodding 'u' thing is doing my head in.

Let's see if i got it yet :

$$\frac {dN}{dt}=kc$$
$$c=\frac {c_0V-2N}{V}$$
$$\frac {dN}{dt}=k \frac {c_0V-2N}{V}$$
$$\frac {dN}{c_0V-2N} = \frac kV dt$$
let
$$u = c_0V-2N$$
Right. Here is where it gets messy.
$$du = u' = (c_0V-2N)'$$
Left-hand part first
$$u' = 1du = du$$
In the right-hand part only N is a variable, so we get the derivative of that, i.e. dN
$$(c_0V-2N)' = (0-2)dN = -2dN$$
overall, we get
$$du = -2dN$$
therefore
$$dN = -\frac 12du$$
so now we can substitute for dN in the next step and get all integrobblers the same species
$$\frac {dN}{u} = \frac kV dt$$
and finally integrate
$$\int -\frac 12 du\frac 1u = \int \frac kV dt$$
$$-\frac 12 \int \frac {du}{u} = \frac kV \int dt$$
$$- \frac 12 ln(u) = \frac kV t$$
substitute for u
$$ - \frac 12 ln(c_0V-2N) = \frac kV t$$
$$ln(c_0V-2N) = -2 \frac kV t $$
$$c_0V-2N = e ^{-\frac {2kt}{V}}$$
$$2N = c_0V - e ^{-\frac {2kt}{V}}$$
$$N = \frac 12 \Big( c_0V - e ^{-\frac {2kt}{V}}\Big)$$

i'm assuming the C generated in each integration is the same C, so cancel out.

aga - 22-4-2016 at 07:13

I guess the rate of gas generation is the first derivative of that, which i think is
$$-\frac 12 e^{-\frac {2k}{V}}$$

[Edited on 22-4-2016 by aga]
Hang on, surely the Rate will depend on the concentration as well ?

Doh.

[Edited on 22-4-2016 by aga]

blogfast25 - 22-4-2016 at 08:05

Quote: Originally posted by aga  

i'm assuming the C generated in each integration is the same C, so cancel out.



Heck. Everything was 100 % correct up to that point.

$$N = \frac 12 \Big( c_0V - e ^{-\frac {2kt}{V}}\Big)$$

... is incorrect because:

$$- \frac 12 \ln(c_0V-2N) = \frac kV t$$

... should have been:


$$- \frac 12 \ln(c_0V-2N) = \frac kV t+C$$
$$\implies \ln(c_0V-2N)=-2 \frac kV t -2C$$
$$c_0V-2N=e^{-2 \frac kV t -2C}=e^{-2C}e^{-2 \frac kV t}$$
Now I'm gonna use a little trick that isn't indispensable but just helps a bit. e<sup>-2C</sup> is a constant too, so I'll call it K:
$$c_0V-2N=Ke^{-2 \frac kV t}$$
Now with the initial condition:
$$t=0, N=0$$
$$c_0V=K$$
So:
$$N=\frac{c_0V}{2}\big(1-e^{-2 \frac kV t}\big)$$
And:
$$\frac{dN}{dt}=kc_0e^{-2 \frac kV t}$$
We can see that these are correct because:
$$t \to \infty \implies N=\frac{c_0V}{2}$$

c0V mol of HCl does indeed generate (c0V)/2 mol of H2.

Also:
$$\Big(\frac{dN}{dt}\Big)_{t=0}=kc_0$$
which is also correct.

That your solution was incorrect could be seen because you're subtracting a dimensionless number from moles. "apples minus oranges" error!

Quote: Originally posted by aga  
I guess the rate of gas generation is the first derivative of that, which i think is
$$-\frac 12 e^{-\frac {2k}{V}}$$

[Edited on 22-4-2016 by aga]
Hang on, surely the Rate will depend on the concentration as well ?



Indeed, Sir. Indeed. QED.


[Edited on 22-4-2016 by blogfast25]

aga - 22-4-2016 at 08:49

Oh bollocks.

Big fat fecking C bollocks !

Ah well, did i get into the top 30% for effort, or do i remain in the bottom 20% ?

[Edited on 22-4-2016 by aga]

blogfast25 - 22-4-2016 at 10:07

Quote: Originally posted by aga  
Oh bollocks.

Big fat fecking C bollocks !

Ah well, did i get into the top 30% for effort, or do i remain in the bottom 20% ?

[Edited on 22-4-2016 by aga]


Top 40 %!

One more problem coming up tonite, similar to this one (mathematically speaking). Hold beer till about 8 to 8.30 UTC. :D

After that: partial derivatives!

[Edited on 22-4-2016 by blogfast25]

aga - 22-4-2016 at 10:11

Quote: Originally posted by blogfast25  
Hold beer till about 8 to 8.30 UTC. :D

Erm, er ...

Edit:

Adding that impossible task into the equation makes this possibly the most difficult SM page of all time !

[Edited on 22-4-2016 by aga]

Projectile velocity problem:

blogfast25 - 22-4-2016 at 11:06

A 50 kg mass is shot from a cannon straight up with an initial velocity of 10m/s off a bridge that is 100 meters above the ground. If air resistance (drag force Fd) is given by 5v determine the velocity of the mass when it hits the ground.

Solution: First, notice that when we say straight up, we really mean straight up, but in such a way that it will miss the bridge on the way back down. Here is a sketch of the situation.

Bridge projectile.png - 5kB

According to Newton’s Second Law, the projectile will experience acceleration acc.:
$$ma=mg-F_{drag}$$
$$a=\frac{dv}{dt}=v’$$
$$v'=g-\frac{F_{drag}}{m}$$
$$v’=9.8-\frac{5v}{50}=9.8-\frac{v}{10}$$
Initial condition:
$$t=0,v(0)=-10$$
This is a two-step problem. Firstly find an expression for v(t) from the above.


[Edited on 22-4-2016 by blogfast25]

aga - 22-4-2016 at 11:35

OK. So will start at 10m/s going Up, reduce to 0 then accelerate Down at 9.81m/s/s from whatever height it was at at the 0 point, so we got to find that initial height, add 100m and then work out it's velocity when it hits the floor, i.e. terminal velocity.

Sweet Jesus, help me !

[Edited on 22-4-2016 by aga]

Oh. You did by getting bloggers to add the initial equations. ah. thanks.

[Edited on 22-4-2016 by aga]

While we're at it, is bloggers the consumate Calculus devil or an angel on a deep-cover operation ?

[Edited on 22-4-2016 by aga]

blogfast25 - 22-4-2016 at 13:34

Quote: Originally posted by aga  

While we're at it, is bloggers the consumate Calculus devil or an angel on a deep-cover operation ?



Not sure about me but there is such a thing called the Devil's curve...

[Edited on 22-4-2016 by blogfast25]

aga - 23-4-2016 at 11:45

OK. So before i miss another C, here's the Plan :

Assuming that the cannon is on a retractable arm that removes the cannon immediately after firing (so we got true straight up/straight down motion), we have to calculate distance travelled from the firing point to the 0m/s point at the top (of the arc in the sketch).

Add that to 100m then calculate the velocity of the mass when it hits the ground.

It will accelerate down from there by 9.8 m/s/s as per the question data, adjusted by the drag factor.

The 5v is giving me some concern, as in 'what units ?', although i suspect that is because i have not done the calculations yet.

blogfast25 - 23-4-2016 at 12:34

Quote: Originally posted by aga  
OK. So before i miss another C, here's the Plan :

Assuming that the cannon is on a retractable arm that removes the cannon immediately after firing (so we got true straight up/straight down motion), we have to calculate distance travelled from the firing point to the 0m/s point at the top (of the arc in the sketch).

Add that to 100m then calculate the velocity of the mass when it hits the ground.

It will accelerate down from there by 9.8 m/s/s as per the question data, adjusted by the drag factor.

The 5v is giving me some concern, as in 'what units ?', although i suspect that is because i have not done the calculations yet.


Haha, like your removable cannon idea!

$$F_{drag}=5v$$
$$5\:\mathrm{Nm^{-1}s}$$

The only solution here is to calculate the total flight time, then use that as input into v(t) to find vground.

For that, develop an expression for v(t).

Then we'll develop an expression for x(t):

$$x(t)=\int v(t)dt$$

But FIRST, develop v(t). Presto!

[Edited on 23-4-2016 by blogfast25]

aga - 23-4-2016 at 12:39

A direction-changing two-dimensional parabola (time is one ..)

OK.

I'll have to invoke the Beer Ammendment and attempt it on the 'morrow.

Side-note:

Do you find these bits of maths Easy ?

Currently i find them really really hard (as you may have noticed).

blogfast25 - 23-4-2016 at 13:11

Quote: Originally posted by aga  
A direction-changing two-dimensional parabola (time is one ..)

OK.

I'll have to invoke the Beer Ammendment and attempt it on the 'morrow.

Side-note:

Do you find these bits of maths Easy ?

Currently i find them really really hard (as you may have noticed).


Strictly speaking we should do the whole thing in vector calculus:

$$\frac{d\vec{v}}{dt}=\vec{g}-5\vec{v}$$

Does that make it any clearer? :D As luck has it, here we can deal with the scalars (magnitude and sense of the vectors) only, as above.

Easy? Maybe not but it really is all about practice. I've been using calculus for over 30 years now. :)

aga - 23-4-2016 at 13:14

30 years !

Oh dear.

Can i at least write a letter to my mum before all the Whipping starts ?

blogfast25 - 23-4-2016 at 13:27

Quote: Originally posted by aga  


Can i at least write a letter to my mum before all the Whipping starts ?


Keep it short, boy.

aga - 24-4-2016 at 02:50

With approriate trepidation ...

$$a=v'=\frac {dv}{dt} = 9.8-\frac{v}{10} = \frac {98-v}{10}$$
$$\frac {dv}{dt} = \frac {98-v}{10}$$
$$dt = \frac {10dv}{98-v}$$
let u=98 - v
$$u' = du = (98-v)'dv = -dv$$
$$dv = -du$$
$$dt = -10 \frac {du}{u}$$
$$\int dt = -10 \int \frac {du}{u}$$
$$t = -10 ln(u)+C$$
$$C = t+10 ln(u) = t+10 ln(98-v)$$
bung in the starting conditions
$$\therefore C = 0+10 ln(98+10) = 46.82$$
now re-arrange
$$t = -10ln(98-v)+46.82$$
$$t-46.82 = -10ln(98-v)$$
$$\frac {46.82-t}{10} = ln(98-v)$$
$$e^{\frac {1}{10} (46.82-t)} = 98-v$$
$$v = 98 - e^{\frac {1}{10} (46.82-t)}$$



blogfast25 - 25-4-2016 at 11:43

So sorry I missed this for some reason.

Your solution is:

{Drum roll}...

{another drum roll...}

{final, longer drum roll!}

100 % correct!

A slightly simpler form (but equal to yours) is:

$$v(t)=98-108e^{-0.1t}$$
<hr>

Next step: calculate total flight time. For this we need an expression for x(t):

$$v(t)=\frac{dx(t)}{dt}$$
$$\implies x(t)=\int v(t)dt$$
Initial condition:
$$t=0, x(0)=0$$

Chop, chop! :D

[Edited on 25-4-2016 by blogfast25]

aga - 25-4-2016 at 11:51

Do what ?!?!

How the F is

$$98 - e^{\frac {1}{10} (46.82-t)} = 98-108e^{-0.1t}$$

I'm not an habitual 'e' user so don't look quite so surprised, Sir.

By the looks of things, i think i shall keep wearing the extra-thick cow-hide leather unterhosen.

j_sum1 - 25-4-2016 at 12:03

$$98 - e^{\frac {1}{10} (46.82-t)} = 98 - e^{(4.682-0.1t)}=98 - e^{4.682}e^{-0.1t}=98-108e^{-0.1t}$$

blogfast25 - 25-4-2016 at 12:04

A fundamental property of exponentials:

$$e^{a-b}=e^ae^{-b}$$
Here a = 46.82/10 and b = -0.1.
$$e^{4.682}=108$$

aga - 25-4-2016 at 12:13

Well i'll be !

It's really getting annoying how many holes on my knowledge there actually are.

Guess i should have studied longer.

Edit:

Will your solution work out easier than mine in the next step ?

I'm guessing it will.


[Edited on 25-4-2016 by aga]

blogfast25 - 25-4-2016 at 13:44

Quote: Originally posted by aga  


Will your solution work out easier than mine in the next step ?

I'm guessing it will.



My shape of the solution is a bit easier to integrate, yes.

aga - 26-4-2016 at 10:36

Delay due to this little bugger is giving me a hard time :
$$e^-\frac{1}{10}t$$
Not given up, just need to learn about e and how to flip it about.

Still calculating.

[Edited on 26-4-2016 by aga]

blogfast25 - 26-4-2016 at 11:48

Chain rule, g-dammit!

Looks like there might be some whipping today, kids... ;)

aga - 26-4-2016 at 12:25

i keep trying u = - t/10 and it bites me a lot.

Perhaps u = e ^ -1/10t will like a biscuit.

blogfast25 - 26-4-2016 at 13:49

I spy with my little eye, something like this:


e power ax.png - 12kB

:)


[Edited on 26-4-2016 by blogfast25]

aga - 26-4-2016 at 22:53

A Cheat Sheet - brilliant !

That e jobbie makes things much simpler.
$$x(t)=\int v(t)dt$$
$$x(t)=\int 98-108e^{-0.1t} dt$$
$$98\int dt - 108\int e^{-0.1t} dt$$
$$98t - \frac { 108e^{-0.1t}}{-0.1} + C$$
$$98t + 1080e^{-0.1t} + C$$

aga - 27-4-2016 at 03:47

With x=t=0, i get C=-1080

Try as i might, i can't isolate 't'

blogfast25 - 27-4-2016 at 05:42

$$C=-1080$$
... is correct!

So we get:
$$x(t)=98t+1080e^{-0.1t}-1080$$
And no, you can't isolate t from that. To find the flight time, we set x(t) = 100:
$$100=98t+1080e^{-0.1t}-1080$$
This is a transcendental equation that has no analytical solution. But it does have a numerical solution, which I give you:
$$t=5.98\:\mathrm{s}$$

Now plug that into v(t) to get final velocity.

PS. That 'cheat-sheet' has been posted here at least twice before! :D

aga - 27-4-2016 at 08:09

25.51 m/s

I was thinking that the total distance travelled would be the Up part (approx 9m) plus the 100m drop.

Cheat sheet bookmarked, thanks.

blogfast25 - 27-4-2016 at 08:37

Quote: Originally posted by aga  
25.51 m/s

I was thinking that the total distance travelled would be the Up part (approx 9m) plus the 100m drop.

Cheat sheet bookmarked, thanks.


$$v=98-108e^{-0.1t}$$
$$t=5.98$$
$$v=98-108e^{-0.598}=38.6\:\mathrm{m/s}$$


'Total distance travelled': a common misconception. x(t) is simply the position of the object in the coordinate system I gave you (so generously!). The total difference travelled could also be calculated by calculus but it doesn't help us here.
<hr>
We're nearing the end of our little journey into basic calculus.

In the following few sessions I'll briefly touch upon:

1. Partial derivatives.
2. Simple multi-variate optimisation problems.
2. A few important second order differential equations.


[Edited on 27-4-2016 by blogfast25]

aga - 27-4-2016 at 10:38

Doh ! After all that i pressed the wrong calculator buttons at the easy step !

How did you get a number out of the 'transcendental equation' ?

Is there a faster method than Meditiation or Reincarnation ?

blogfast25 - 27-4-2016 at 10:50

Quote: Originally posted by aga  
Doh ! After all that i pressed the wrong calculator buttons at the easy step !

How did you get a number out of the 'transcendental equation' ?

Is there a faster method than Meditiation or Reincarnation ?


Reincarnation is very slow and takes guts. And then you end up in Cleopatra's body and it all gets very messy!

For 1 variable equations that have no analytical solutions, there exists a myriad of numerical (aka iteration methods), the oldest of which is probably the Regula Falsi method.

[Edited on 27-4-2016 by blogfast25]

aga - 27-4-2016 at 11:50

Pretty much maths-saturated at the mo, so i'll file that for Future reading.

Thanks for the reference tho.

blogfast25 - 27-4-2016 at 12:37

I'll leave the partials till tomorrow then.

Partial Derivatives:

blogfast25 - 28-4-2016 at 06:06

Earlier we saw that the first derivative of a function f(x):
$$f’(x)=\frac{df(x)}{dx}$$
... is the gradient (slope) of that function. So how does that work for a function of two variables, f(x,y), or even three or four? Will there be 2, 3 or 4 gradients?

Let’s look at a simple function f(x,y):

$$z=ax+by+c$$
This is the description of a (flat) plane in three dimensions:

Partial derivatives.png - 7kB

z is the black plane in the pic.

Now we add another plane, this one red:

$$y=B$$

The intersection of the black and red planes is the green line with formula:

$$z=ax+bB+c$$
The first derivative to x of this line is:
$$\frac{dz}{dx}=a+0+0=a$$

This is the gradient of the black plane in the x-direction.

Analogously, if we add another plane, this one light blue:
$$x=A$$

The intersection of the black and light blue planes is the yellow line with formula:

$$z=aA+by+c$$
The first derivative to y of this line is:
$$\frac{dz}{dy}=0+b+0=b$$

This is the gradient of the black plane in the y-direction.

We call these gradients partial derivatives:
$$\frac{\partial z}{\partial x}\:\text{and}\:\frac{\partial z}{\partial y}$$
The partial derivative of z to x is computed by ‘pretending’ y is a constant:
$$\frac{\partial z}{\partial x}=a+0+0=a$$
The partial derivative of z to y is computed by ‘pretending’ x is a constant:
$$\frac{\partial z}{\partial y}=0+b+0=b$$
But this isn’t limited to simple functions like z. It works for ALL functions f(x,y), as a few examples will show:

1.
$$z=3x^2-5y^3$$
$$\frac{\partial z}{\partial x}=6x$$
$$\frac{\partial z}{\partial y}=-15y^2$$
2.
$$u=x^2y+3xy^3-xy$$
$$\frac{\partial u}{\partial x}=2xy+3y^3-y$$
$$\frac{\partial u}{\partial y}=x^2+9xy^2-x$$
3.
$$v=\frac{x}{y} -2\frac{y}{x}$$
$$\frac{\partial v}{\partial x}=\frac1y+2\frac{y}{x^2}$$
$$\frac{\partial v}{\partial y}=-\frac{x}{y^2}-\frac2x$$
4.
$$y=ze^{2x}$$
$$\frac{\partial y}{\partial x}=2ze^{2x}$$
$$\frac{\partial y}{\partial z}=e^{2x}$$
Rules of Partial Derivation:

The rules of partial derivation are exactly the same as for ‘normal’ derivation, including the chain rule. Two examples of the latter:

1.
$$z=\sqrt{x^2-3xy}$$
$$\frac{\partial z}{\partial x}=\frac12 (x^2-3xy)^{-\frac12}\frac{\partial}{\partial x}(x^2-3xy)$$
$$=\frac12 (x^2-3xy)^{-\frac12}(2x-3y)$$
and:
$$\frac{\partial z}{\partial y}=\frac12 (x^2-3xy)^{-\frac12}\frac{\partial}{\partial y}(x^2-3xy)$$
$$=\frac12 (x^2-3xy)^{-\frac12}(-3x)=-\frac32 x(x^2-3xy)^{-\frac12}$$
2.
$$z=e^{x^3-4xy^2}$$
$$\frac{\partial z}{\partial x}=e^{x^3-4xy^2}\frac{\partial}{\partial x}(x^3-4xy^2)$$
$$=e^{x^3-4xy^2}(3x^2-4y^2)$$
and:
$$\frac{\partial z}{\partial y}=e^{x^3-4xy^2}\frac{\partial}{\partial y}(x^3-4xy^2)$$
$$=e^{x^3-4xy^2}(-8xy)=-8xye^{x^3-4xy^2}$$

Partial derivatives of functions dependent on more than two independent variables:

Such a function can generically by represented by:
$$f(x_1,x_2,x_3,...,x_i,...,x_n)$$
For each variable x<sub>i</sub> a partial derivative:
$$\frac{\partial f}{\partial x_i}$$
... can be computed. It's done by considering all other variables (other than x<sub>i</sub>;) as constants.

Consider the following example:

$$u(x,y,z)=x^3y+x^2z^2-3zy^2+5xyz$$
$$\frac{\partial u}{\partial x}=3x^2y+2xz^2+5yz$$
$$\frac{\partial u}{\partial y}=x^3-6zy+5xz$$
$$\frac{\partial u}{\partial z}=2x^2z-3y^2+5xy$$
<hr>
I'll let that 'sink in' for a bit and take questions if there are any. Then some simple exercises will be posted.



[Edited on 28-4-2016 by blogfast25]

aga - 28-4-2016 at 09:33

Cool ! Let's Go !

Haven't gotten anything wrong for Hours now !


blogfast25 - 28-4-2016 at 11:27

Firstly, a word about notation. The still frequently used:
$$\frac{\partial f}{\partial x}$$
... is fairly clunky (even more so in LaTex), so I propose a more modern and shorter notation:
$$\frac{\partial f}{\partial x}=f_x$$
Example:
$$u=2x-6y^3$$
$$\implies \frac{\partial f}{\partial y}=f_y=-18y^2$$
Exercises: compute f<sub>x</sub> and f<sub>y</sub> for the following (x,y) functions. (I'll put in a trigger warning, if there's 'danger' ahead).

1.
$$x^2y^3-2xy^4$$
2.
$$\cos x+\sin y$$
3.
$$2xy+\frac{5y}{x}$$
4. (product rule)
$$(x^2-y)(1+y^2)$$
5.
$$x^3y^2-6xy+3x$$
6. (chain rule)
$$\cos(2x-y)$$
7.(product rule + chain rule)
$$x^2\sin (y-x)$$
8. (chain rule)
$$e^{3xy}$$

Enjoy!

[Edited on 28-4-2016 by blogfast25]

aga - 28-4-2016 at 12:21

Hmm. Best go cautiously then ...

1. $$x^2y^3-2xy^4$$

$$\frac{\partial f}{\partial x}= f_x = 2xy^3-2y^4$$
$$f_y = 3x^2y^2-8xy^3$$

Owzat ?

blogfast25 - 28-4-2016 at 13:12

Correct. One done, seven more to go.

aga - 28-4-2016 at 13:18

Hmm. Nothing Bad happened, but it could be a trap.

Let's try the next one
2.
$$\cos x + \sin y$$
$$f_x = sin y - sin x$$
$$f_y = \cos x + cos y$$

aga - 28-4-2016 at 13:30

3.
$$2xy+\frac{5y}{x}$$
$$f_x = 2y - \frac {5y}{x^2}$$
$$f_y = 2x +\frac 5x$$

it feels like i just stepped on a landmine that leapt 10m into the air after i took my foot off, yet failed to explode, just yet.

aga - 28-4-2016 at 13:36

4. (geting scared now)
$$(x^2-y)(1+y^2)$$
$$ = (x^2-y)' + (1+y^2)'$$
$$f_x = 2x + y^2$$
$$f_y = x^2 -1 + 2y$$

Gut instinct says it's time to start running.

aga - 28-4-2016 at 13:48

5.
$$x^3y^2-6xy+3x$$
$$f_x = 3x^2y^2 - 6y + 3$$
$$f_y = 2x^3y - 6x + 3x$$

Gravy Pressure is pretty much in the Danger Zone now.

aga - 28-4-2016 at 13:55

6.
$$\cos(2x-y)$$
$$f_{bleh} = \cos(2x-y)'(2x-y)'$$
$$f_x = -\sin(2x-y)(2-y)$$
$$f_y = -\sin(2x-y)(2x-1)$$

that does not look right, and i think the Gravy Seals are giving way.


[Edited on 28-4-2016 by aga]

[Edited on 28-4-2016 by aga]

aga - 28-4-2016 at 13:57

It's no good Heuston. We have Leakage.

Best leave 7 and 8 till the 'morn.

blogfast25 - 28-4-2016 at 14:49

1. Correct

2. Incorrect.
$$\cos x+\sin y$$

If y is a constant, then so is siny, so:
$$f_x=-\sin x$$
If x is a constant, then so is cosx, so:
$$f_y=\cos y$$
3. Correct

4. (product rule)

Incorrect, you're applying the sum rule, not the product rule. Try:
$$(x^2-y)(1+y^2)$$
$$f_x=f_x(x^2-y) \times (1+y^2)+(x^2-y) \times f_x(1+y^2)$$
Similar for f<sub>y</sub>.

5. fx is correct but fy should be:
$$x^3y^2-6xy+3x$$
$$f_y=2x^3y-6x$$
6. (chain rule)
Almost but not quite:
$$\cos(2x-y)$$
$$f_x=-\sin(2x-y)f_x(2x-y)=2\sin(2x-y)$$
$$f_y=-\sin(2x-y)f_y(2x-y)=-\sin(2x-y)$$

Ok, so we've got some gremlins to deal with. :)

[Edited on 28-4-2016 by blogfast25]

aga - 29-4-2016 at 00:35

Doh. Chain rule is tricky.
7.
$$x^2\sin (y-x)$$
i think it goes like this for the chainy bit:
$$sin(y-x)'(y-x)'$$
$$f_x = (x^2)'sin(y-x)'(y-x)'$$
$$= 2x(-cos(y-x))(-1)$$
$$= 2xcos(y-x)$$
$$f_y = (x^2)(sin(y-x)')(y-x)'$$
$$= x^2(-cos(y-x))(1)$$
$$=-x^2cos(y-x)$$

aga - 29-4-2016 at 00:42

8.
Now these 'e' things really confuse the hell out of me.
$$e^{3xy}$$
the rule says e^n just ends up as e^n, but surely the 3xy needs messing with, so ignoring all the alarm bells, here goes:
$$f_x = e^{3(yx)'(x)'}$$
$$= e^{3y}$$
$$f_y = e^{3x}$$

blogfast25 - 29-4-2016 at 06:04

7. (chain rule + product rule)
$$x^2\sin(y-x)$$
You got the chain rule right and thus f<sub>y</sub>. But for f<sub>x</sub> you needed to apply also the product rule because x<sup>2</sup> is a function, so:
$$f_x=f_x(x^2) \times \sin(y-x)+x^2 \times f_x(\sin(y-x))$$
$$=2x\sin(y-x)+x^2[-\cos(y-x)\times f_x(y-x)]$$
$$=2x\sin(y-x)+\cos(y-x)$$

8. (chain rule)

$$e^{3xy}$$

Here you were a bit all over the place. Remember how to derive exponentials in one variable only, with the chain rule:

$$g=e^{f(x)}$$
$$g'=e^{f(x)}\times f'(x)$$
For an (x,y) exponential:
$$g=e^{f(x,y)}$$
$$g_x=e^{f(x,y)}\times f_x(x,y)$$
$$g_y=e^{f(x,y)}\times f_y(x,y)$$
Applied here:
$$f_x=e^{3xy} \times f_x(3xy)=e^{3xy}(3y)=3ye^{3xy}$$
$$f_y=e^{3xy} \times f_y(3xy)=e^{3xy}(3x)=3xe^{3xy}$$

So definitely some gremlins, not to mention a few missiles going down rather than up!

[Edited on 29-4-2016 by blogfast25]

aga - 29-4-2016 at 11:41

Quote: Originally posted by blogfast25  
So definitely some gremlins, not to mention a few missiles going down rather than up!

Beginning to realise that i'm That guy who gets you Rocket Men all the food, lodgings, material, and the booze & hookers every weekend, whilst earning handsomely from that plus side-rackets.

Then organises the team members' coffins when the Rocket goes sideways and some heads must roll (250% markup on coffins).

Then sells the little i can remember to the Enemy for a Vast fortune (and immunity) once they win the war.
(maybe before, depends on immunity from Whom).

It's pretty much apparent that i was not designed to be a gifted theoretical mathematician.

blogfast25 - 29-4-2016 at 12:30

Quote: Originally posted by aga  

It's pretty much apparent that i was not designed to be a gifted theoretical mathematician.


For most (like me), math is hard work (but rewarding, IMO). So there's few with an excuse ("whoohoo, look at me, I'm sooooo gifted!"), so what? :D

In characteristic human style we'll now just stick our heads in the sand and plow on!

Tomorrow: simple multi-variate optima.

aga - 29-4-2016 at 13:17

Don't get me wrong :

i actually Like this algebra stuff, just that it's pretty clear that i'm not careful or thoughtful enough for such a Precise discipline.

Chemistry should be fine as i have Buckets to mix stuff up in ;)

Multi-variate optima:

blogfast25 - 30-4-2016 at 04:57

Higher up we saw that for a simple function f(x), an optimum exists, if:
$$\frac{df(x)}{dx}=0$$

optima.png - 5kB

Similarly, a multivariate function:
$$f(x_1,x_2,...,x_i,...,x_n)$$
... has an optimum if:
$$f_{x_1}=0,f_{x_n}=0,...,f_{x_n}=0,$$
The latter condition forms a system of simultaneous equations which when solved yields the numerical values x<sub>i</sub> of the optimum.

We won't concern ourselves here with the formal theory of multi-variate optima (which includes detection of absolute and relative extremes and saddle points), instead we'll use common sense to determine whether a found optimum is a maximum or minimum.

First example:

$$f(x,y)=x^2+y^2$$
$$f_x=2x$$
$$f_y=2y$$
An optimum exists for:
$$2x=0 \implies x=0$$
$$2y=0 \implies y=0$$
The optimum value is:
$$f(0,0)=0$$
For slightly larger values of x and y, e.g. (1,1), we get:
$$f(1,1)=2$$
... which indicates (0,0) is a minimum.

Second example:

$$x^2+2y^2-xy+14y$$
$$f_x=2x-y=0 \implies y=2x$$
$$f_y=4y-x+14=0 \implies 8x-x=-14$$
$$x=-2, y=-4$$

3D plot:

optima ex 2.png - 92kB

Third example:
$$f(x,y)=xy+\frac8x+\frac8y$$
$$f_x=y-\frac{8}{x^2}=0$$
$$f_y=x-\frac{8}{y^2}=0$$
Some reworking and substituting:
$$y=\frac{8}{x^2}$$
$$x-\frac{x^4}{8}=0$$
$$x(1-\frac{x^3}{8})=0$$
$$1-\frac{x^3}{8}=0$$
$$x=2$$
$$y=2$$
$$f(2,2)=4+4+4=12$$
$$f(4,4)=16+2+2=18$$
(2,2) is a minimum.

Exercise:
$$f(x,y)=(x-1)^2+y^3-3y^2-9y+5$$


[Edited on 30-4-2016 by blogfast25]

aga - 30-4-2016 at 09:19

Um. Er. Ok. Find the f(x,y) = 0 ?
$$f(x,y)=(x-1)^2+y^3-3y^2-9y+5$$
$$=x^2-2x+1+y^3-3y^2-9y+5$$
$$f_x = 2x-2+0-0-0+0$$
$$ = 2x - 2$$
$$2x-2 = 0 $$
$$\therefore x=1$$
$$f_y = 0-0+0+3y^2-6y-9+0$$
$$=y^2-2y-3$$
$$=y(y-2)-3$$
$$y(y-2)-3 = 0$$
$$y(y-2)=3$$
$$\therefore y = 3$$
$$\implies f(x,y) = 0 = f(1,3)$$
that very last bit was more common sense and trying some numbers than actual maths.

Did i just become Cleopatra ? If so, bathe your ass in milk immediately.

blogfast25 - 30-4-2016 at 11:30

aga:

Both partial derivatives were correct.

So is x = 1.

But your attempt at solving:

$$y^2-2y-3=0$$

... was very '#creative#' but not very correct! :D:D

No, it does not imply that if:
$$y(y-2)=3$$
... then:
$$y=3$$

For a general quadratic equation:

$$ax^2+bx+c=0$$
$$\implies x_{1,2}=\frac{-b \pm \sqrt{b^2-4ac}}{2a}$$
So we have two roots:
$$y=3,y=-1$$
So we have two optima, (1,-1), a maximum and (1,3), a minimum, as the 3D plot shows:

optima ex 1.png - 134kB


[Edited on 30-4-2016 by blogfast25]

 Pages:  1    3    5