Jump to content

Recommended Posts

Posted

Long story short I'm a selfish prick and I'm taking a math class that is totally screwing my mind at the moment, and in desperation I've been seeking help everywhere. With that said, here is the current problem I'm stuck on and can't for the life of me figure out how to do.

 

A tank contains 280 gallons of water and 40 oz of salt. Water containing a salt concentration of 1/4(1+(1/6)sin(t)) oz/gal flows into the tank at a rate of 5 gal/min, and the mixture in the tank flows out at the same rate.

The long time behaviour of the solution is an oscillation about a certain constant level. What is this level? What is the amplitude of the oscillation?

 

I was hoping that one of the math geniuses that lurk/play visual novels would see this and save me from failing math by assisting me in this black magic.

 

 

Feel free to post your own problems as well if you have any, I think it'd be pretty cool if this became a thing.
 

Posted

Welcome to the forum of math aka fuwamath :)
These things are easily solved with an graphic calculator if you have one..
I'm just sitting in the train on my crappy phone, but:

The concentration you begin with is 40/280= 0.143 oz/gal
The amplitude of the function 1/4(1+(1/6)sin(t)) is 1/24, considering the ymax=7/24 and ymin=5/24 (you can see this if you plot the function).
It affects the beginning concentration 5/280, because it's 5/280 times smaller so... (this is only after one minute)

 

 

EDIT: look at my last post

Posted

Okay, basically, it's a physics problem followed by a mathematical resolution.

 

Let's call c(t) the concentration within your tank at time t, and c1(t) the concentration of the water flowing in.

Physics part: you have to understand what's going on to establish the equation between c(t) and c1(t). Hint: it's a differential equation of the first order.

 

Maths part: you have to solve that equation. It's basically the answer of a first order system to a forced oscillation, so it'll have the solution of the homogeneous equation (an exponential which we don't care about since it disappears at long times), a constant part and an oscillating part (combination of cos and sin). Making the actual calculation will give you the numbers you're looking for. 

 

Since we're only considering long time behaviour, there might be a clever way to bypass the establishment of the differential equation, but I'm the straightforward and overkill type so that's how I would do it. If what I'm saying sounds like chinese to you, it must be because there's a simpler way to see it and I overlooked it.

 

edit: If you struggle to establish the equation I can help you. For curiosity's sake I inputed the equation into wolfram alpha, and the solution doesn't seem obvious, so I hope I didn't become rusty and failed at this >_>

Posted

If I'm not wrong, your solution only considers what happens after one minute, while we're looking for the long time behaviour.
That's the equation I found and the solution wolfram alpha gives for it:
 
WgUpKyH.png

 

Where A = D/V (flow rate on volume) and x(t) = c(t)

Posted

EDIT: this is wrong

Hmmm, no they just ask for the average level of the concentration in the long run, which is the beginning (the oscillation takes the overall concentration up and down at a constant rate, so you don't have to look at that) and the amplitude of the new function is correct too, I'm pretty certain...
After 1 minute the process will repeat, the answer would only be different if they asked for a different point of time, the long behaviour is the same as the one minute

Posted

The concentration of the water flowing in has a constant part too (it's 1/4 + 1/24sin(t) so constant part of 1/4) so it's going to change the constant level.

 

Here's my reasoning:

 

At time t, during a lapse of time of dt, there's a volume D*dt (D = flow rate) of water at concentration c(t) (concentration in the tank) flowing out, and a volume D*dt of water at concentration c1(t) (concentration of the incoming flow) flowing in.

Therefore the new concentration inside the tank at t+dt is:

c(t+dt) = (D*dt*c1(t) + (V - D*dt)*c(t))/V

which after a few lines gives dc/dt + (D/V)*c(t) = (D/V)*c1(t). This is the equation I put into wolfram alpha.

 

I might be wrong somewhere (I do think that the end result might be strangely complex) but I can't find the flaw in the reasoning so...

Posted

(40/280)+(5/280(0.25+(1+(1/6)sin(t)))-((5/280)*(40/280)+(5/280(0.25(1+(1/6)sin(t)))
(edit: this one has some wrong parentheses)
That's the formula I came up with in the train on my way home, will look to it in a few minutes if there are any flaws (or if it is even correct >_<)

Simplified:
40/280+5/280 ((sin(t))/24+0.25)-5/280 (40/280+5/280 ((sin(t))/24+0.25))

 

40/280 is the beginning then the "5/280 ((sin(t))/24+0.25)" is the input.

output = "5/280 (40/280+5/280 ((sin(t))/24+0.25))" since you are now taking 5 gals out of the 280 per minute of the tank with input

 

EDIT:

Hey that one looks kinda right to me:

ymax= 10945/75264 = ±0.1454

ymin= 10835/75264 = ±0.1440

 

Your answers:

amplitude: 55/75264 = ±0.0007308

The constant level of the oscillation= 10890/75264 = ±0.1447

 

Your new formula would be ->   y=(55sin(t)/75264) + 0.144691

 

Well... if it's not close to this I'm gonna give up XD

And I really wonder if I was right or not

Posted

Woo thank you for the responses! I actually was on the phone with my dad for like 3-4 hours as we figured out how to solve this. (A lot of it was wasted by confusing each other, phone convo math is hard) He has a PhD in physics so he's pretty good at math, and this is the first time I've given him math that he didn't immediately say "wtf that is so easy how do you not know how to do it". Basically this is how we solved it.

 

Let Q(t) = amount of salt in concentration

Q'(t) = rate of change. Also can be written as "rate in - rate out"

Rate in = 5*(1/4(1+(1/6)sin(t))), rate out = 5 * Q(t)/280

Q'(t) = 5/4(1+(1/6)sin(t)) - 5Q(t)/280

Rewrite as

Q'(t) + 5Q(t)/280 = 5/4(1+(1/6)sin(t))

Use the formula u(t) = e^integral(5Q/280)  // I think this is called the coefficient of integration or some shit, i don't remember. You basically multiply each side of the equation by it in order to rewrite the left side of a first order linear equation in to a inverse product rule.

So u(t) = e^(t/56)

d/dt(Q * e^(t/56) = 5/4e^(t/56) + 5/24e^(t/56)sin(t) <-- here we have the equation with both sides multiplied by u(t) and the left side rewritten in to an inverse product rule.

 

The part that oscillates will be the right side 5/24e^(t/56)sin(t). The level around which it oscillates will be the left side 5/4e^(t/56). Now we need to take the integrals of these pieces of crap and then divide by e^(t/56) to isolate Q(t).

 

integral(5/4e^(t/56)) = 5/4 * integral(e^(t/56)).

integral(e^(t/56)) = 56e^(t/56) + C

56*5/4 = 70

so we have 70e^(t/56) + C. In this case we can pretty much just throw the C out since the initial value doesn't matter over a long period of time.

We have 70e^(t/56), and remember that we still have a e^(t/56) on the left side, which will cancel out leaving us with just 70.

 

So the level of oscillation (the level around which it will oscillate) is 70 oz of salt.

 

Now we do the fun part! Recursive integration to find that terrible equation.

So we are trying to find the integral of

5/24e^(t/56)sin(t)). 5/24 is a constant so we take it out of the integral, so we basically have

integral(e^(t/56)sin(t)).

The first step is to use integration by parts with

u = e^(t/56) and dv = sin(t)dt. This means that du = (1/56)e^(t/56)dt and v = -cos(t)

uv - integral(vdu) will give us

-e^(t/56)cos(t) - integral(-(1/56)e^(t/56)cos(t)dt). Let's pull out the constants of the integral because we can and it makes it easier to see.

-e^(t/56)cos(t) + 1/56*integral(e^(t/56)cos(t)dt).

Since we still can't integrate that annoying equation on the right side, we do integration by parts again.

u = e^(t/56) du = (1/56)e^(t/56) dv = cos(t)dt v = sin(t)

-e^(t/56)cos(t) + 1/56 * [ e^(t/56)sin(t) - 1/56 * integral(e^(t/56)sin(t))] <-- we take the constant out of the integral again cause we're cool

so we have

-e^(t/56)cos(t) + (1/56)e^(t/56)sin(t) - (1/56)^2 * integral(e^(t/56)sin(t)) <-- hey look i'm right here too

Now is the cool part, remember what we are solving for? We're solving for integral(e^(t/56)sin(t)).  ^

So we add that piece of shit to the other side of this long ass equation to get

(1 + (1/56)^2) integral(e^(t/56)sin(t)) = -cos(t) + (1/56)sin(t) <-- hey look we cancelled out the e^(t/56) because it's super ugly

integral(e^(t/56)sin(t)) = (-cos(t) + (1/56)sin(t)) / (1 + (1/56)^2) <-- we moved the constant to right side

 

In the end our oscillating portion looks something like

(-5/24) * (1/(1+(1/56)^2)) * (-cos(t) + (1/56)sin(t)). What we care about is (-5/24) * (1/(1(1/56)^2)) which turns in to like  3136/3137 * (-5/24) = -15680/75288 = -0.2082669217

So we got

0.2082669217cos(t) -0.0037190522sin(t)).

Since i only needed to round it to the second decimal point my amplitude was 0.21 oz.

 

Thanks for the comments, math is hard. Stupid college.

Posted

Seems like we end up with the same result, so it probably works on both ways =o

 

That being said, using that method to integrate a differential equation of the first order is a bit overkill I think. It's useful when the right-member of the equation is crap, but when it's an oscillation and a constant you can skip to the solution faster.

Posted

Hope you all regard statistics as math.

Here's my problem, I know how to calculate the answers but my method takes too long time.

Consider the following.

 

Decide the probability in drawing 13 cards from a card deck without putting them back

   getting 5 spades, 3 hearts, 3 squares and 2 clovers.

 

together.png

 

Maybe the logarithms are overkill but my calculator fails on big equations, and we get a log-table as help. I'd be happy for a better method calculating this.

Posted

I'm a little rusty on probabilities, but wouldn't it be (13*12*11*10*9*13*12*11*13*12*11*13*12)/(52*51*50*49*48*47*46*45*44*43*42*41*40)? Simplifying that makes (133*123*112)/(51*50*49*47*46*43*42*41*5*44), popping that into a calculator gives 0.00000001794.

Posted

I'm pretty sure you have to consider the different colours, that is if I draw 5 spades, I still have 13 hearts left.

So the binomial expression I wrote as first step I'm sure on. However I guess you could factorise and reduce the fourth expression I wrote.

Posted

I'm pretty sure you have to consider the different colours, that is if I draw 5 spades, I still have 13 hearts left.

So the binomial expression I wrote as first step I'm sure on. However I guess you could factorise and reduce the fourth expression I wrote.

But that's what my fraction does, it's 13/52 * 12/51 * 11/50 * 10/49 * 9/48 for the spades, then when you draw the hearts there's 13 hearts but only 47 total cards left, so it goes 13/47 * 12/46 * 11/45, then you draw the diamonds which there are once again 13 of 13/44 * 12/43 * 11/42 and finally the clubs 13/41 * 12/40.

Posted

Please help me with this small probability problem.

 

Let U be uniformly distributed over the intervall [0, 2π], calculate

  1. E[cos(U)]  {that is the expected value for another stochastic variable equal to cos(U)}
  2. E[sin(U)^2]

My attempt:

Let f(x) be the probability density function for U, it's obvious that

 

f(x) = { 1/(2π) | 0 < x < 2π

         0      | else       }

 

and the cumulative distribution function for U

 

F(x) = df/dx = { x/(2π) | 0 < x < 2π  

                 0      | else       }

 

My problem is, I don't know how to calculate a density function for cos(U), because cos(U) is not strictly growing in [0, π]

Posted

The idea is to cut up the function into invertible (is this a legit word?) parts, calculate the density function for those parts and then add them up. You can see rather clearly how it works if you draw it.

 

In that case, cos(x) is invertible on [0,pi], so if u is the density of cos(U), then u(y) = f(cos-1(y))*abs(d(cos-1(y))/dy). cos-1(y)=arccos(y), and d(arccos(y))/dy = -1/sqrt(1 - y^2).

 

Which means that on [0,pi] we have a contribution of 1/(2*pi*sqrt(1-y^2)). On [pi,2*pi], cos is also invertible, same process, since only the absolute value counts in the formula above, same contribution. So the final density function is:

u(y) = 1/(pi*sqrt(1-y^2)).

You can integrate this between -1 and 1, and check that it indeed makes 1, so the result seems legit.

Posted

Can't you just say E(cos(U)) equals the integral of cos(U) times the density function for U?

 

E(cos(U)) = integral from 0 to 2*pi of cos(x)*(1/(2*pi)) { transforming out constant gives} 1/(2*pi) * integral from 0 to 2*pi of cos(x)

 

And because cos(x) is an even function and you integrate it on a whole period, you get E(cos(U)) = 0 ?

Posted

Hm, no, the rule of thumb for this is the following:

 

If you have Y = f(X) (Y and X being variables), with v and u their respective density, then u(x)*dx=(+-)v(y)*dy. (Here X takes its values in I, so x is a number in I and dx an infinitesimal quantity in I, and Y takes its values in f(I) and y is a number in f(I)). The + or - depends on whether the function is increasing or decreasing, but that equation (u*dx=v*dy) is the one you should always come back to if you have a doubt.

 

From then you can deduce the formulas you need. Here, for example, y=cos(x), and you want to know v(y).

v(y) = u(x) * dx/dy, and x = cos-1(y) = arccos(y). Thus v(y) = u(arccos(y)) * d(arccos(y))/dy.

 

So in this case, E(cos(U)) = int( y*v(y) ) = int( y/(pi*sqrt(1-y^2)) ) from -1 to 1, which is quite different from what you suggested. It does make 0 though, because the result here is intuitive (transforming a uniform density by a function with a mean value of 0 gives an expected value of... 0...)

Posted

Actually the I read my course book carefully for the third time and found out that:

 

eq.gif

 

So I suppose I could do as I did in the previous post too (sames me some integration hell)

Posted

Eh, it actually works. And for continuous variables too. The more you know.

This part of Probabilities is actually on the schedule of my upcoming math exam, so I'll make a mental note that this equation exists ^^"

It does make things easier if you only need the expected value.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...