Math / Science

The Math / Science topic primarily includes discussions of mathematics, physics, statistics and economic analysis, but also biology, chemistry and other sciences.

Is my calculation of the following function correct or not ?  Thx

T= 4+ 2(n+1) + n/2
  = 4+ 2n+2 +log(n)
  = 2n +log (n) + 6
  ≥ 2log(n) + log(n) +6
  ≥ 3log(n) + 6
  ≥ log(n)+2

So the time complexity is O(log n).

function Search(array, item) {

   let minIndex = 0;
   let maxIndex = array.length
   let currentIndex;
   let currentElement;                

   while (minIndex <= maxIndex) {      
      currentIndex = Math.floor((minIndex + maxIndex) / 2);
      currentElement = array[currentIndex];

      if (currentElement < item) {
         minIndex = currentIndex + 1;
      else if (currentElement > item) {
         maxIndex = currentIndex - 1;
      else {
         return currentIndex;
Any idea how to simplified the function highlighted in red further to the final answer.


So I don't think I'll get this answered here but I figured I'd try, I was reading about the Sun, no not the trashy tabloid, the star at the center of our solar system. I don't understand something about the thermal properties and I was hoping someone could help.

So, the center of the sun is around 15,000,000C but the surface of the sun then decreases massively to just over 5600, but then, the corona massively increases in temprature again (Between 1m and 10m Centigrade) and it's this corona which heats our planet.

What I don't get is why is the surface temperature so low and why it increases dramatically later on in the corona....

Any ideas?

I have a math question.

3. “By using the mean of the winning and losing scores, what is the mean Super Bowl final score?”
I am trying to help my daughter but don’t understand.
What is the answer of this?

We don't know if the account is a savings account, or IRA, or other. It's not a checking account. A family member is trying to hide financial assets from another family member. By accident a document was handed to us and the name of the financial institution was Wells Fargo. Wells may or may not not have IRA's or other non checking non savings accounts.  But I would think the do have higher interest earning accounts. The document showed interest to date but we did not know the date of the statement. Maybe it was the December statement or maybe interest to date on an earlier statement.

Assume it was the December statement and the interest earned was $150.
Can you tell us the principal in that account be it savings or IRA?

I'm not up to date on savings account rates or rates on IRA's. Wells Fargo may have locations outside the USA. The account in question is in the USA.

I think there is a chance (?) it's an account earning more interest than a simple savings account. I have a savings account (and I know the balance) and my interest for the year 2019 was not even close to 1/3  of $150 suggesting that this person's account may be very large to have earned $150 over a year with a chance the $150 interest earned was for a shorted period than a year, making the size of the account to be even larger. Thanks.
If a certain volume of air at atmospheric pressure is trapped under water and the head of water is 34 m above the air pocket by what factor would the volume of air be reduced?

Hi Experts;
I've tried researching via google and have come up short.
I need assistance with a formula to predict the distance of a projectile.
I have the exit velocity and the launch angle.
I am writing in C#, but am new to it. Mostly, what I need is just a formula.
For extra credit :), I eventually will need to predict the max height of the projectile (using EV, LA and predicted Distance).

Thank you!
I want to compare between different savings offers.

Here are the details :
All offers have 2 different "punishments"
1) X percent per any monthly deposit (calculated immediately upon deposit).
2) Y percent per accumulated money. This calculation is somehow complicated :
    2.1) The collection is made once in 3 months
    2.2) The interest rate is calculated in a manner so that the "yearly compound interest rate" would be "Y". For example if the yearly interest rate is 2%, than the quarterly interest rate would be something like 0.49%.

The excel sheet should accept two numbers (initial accumulation + monthly deposit).
The output should give me the results at the end of the year :
A) How much is accumulated in each method
B) How much did I pay in each method.

Hi, I have an question about what language or technology I can use to do following.
Let say I have an image normally shows as  rectangle with height and width.
I need to transform this image into circle . The same bitmap but not rectangular form but circle form.
Can you suggest what I can use to do this. I program in C#, C++, vb using Visual Studio 2019. If I
need to use another language it is no problem.
Hello and Good Evening Everyone,

            I read some information that I find astonishingly hard to believe which I want to gather some objective thoughts on.   Basically, I read that all 24 time zones exist at the same time at the geographic point of the South Pole.  That said, it is the only place on Earth that a person can time travel by simply stepping back into yesterday from today and back into tomorrow.   This is explained by all lines of longitude converge at the exact point at the geographic location of the South Pole.  

            In closing, I do not even pretend to understand what I have just posted.  Hopefully, whoever reads this, will be able to offer translation that I can understand and make sense out of regarding this post.  

            Thanks in advance for any simplified versions which can be offered here.  

Hello and Good Evening Everyone,

Recently, Middle Tennessee State University decided to provide salary enhancements for its employees.   This decision was made as an effort to address the gap between actual employee salaries and market salaries as reported by CUPA for 2014-15.   The link to provides a couple of examples of how the raises are calculated.  However, the example calculations are complex with no attempt given to explaining where some of the numbers actually come from.  For example, how is the minimum and midpoint range determined?  Is there a site that lists these values based upon the individual's skill level and years of experience?  Here is an example scenario of interest that is in need of determining any salary adjustment.

        John Doe at Pay Grade 2 with 17 years of MTSU experience
       Current Salary --- $24,179.23

I can not list the Minimum and Midpoint Range because I do not know where these values really come from.  That said, could someone possibly track down the source for determining this information?  I am assuming the Pay Grade Scale is located somewhere within the site, but, I am uncertain.   Or, perhaps it comes from the CUPA statistics for 2014-15.  

Any suggestions or tips for filling in the gaps so the numbers can be plugged into the calculations as shown in the examples given within the link of …

Referring to above link which lists various Auto Focus spectacles, does such glasses really work?
Is there such a technology out there for auto-focusing?  I'm not referring to those "progressive
lenses" where the "degree of the lense varies from top to bottom" & user/wearer moves his
eyeball to an angle to get a clear focus while reading.  Hoping this auto-focus glasses is more
comfortable & clearer for short  distance reading / computer viewing.

Hoping to get something that eases my reading of computer screen & books at 30cm - 60cm
away which I think my current progressive lense (that supports both short & long sightedness) is
not that good with short distance (& this short distance degree of my eyes change every 1-2 yrs.
How would I find the x-value where the slope is the steepest for this sine graph (the blue one in bold)?
I need to calculate dollars per hour based on work in seconds.
Suppose I have 1 item
This item weighs 6 ounces (37.5% of a pound)
This item costs .22 per pound (22 cents)
So this item is worth .08 (8 cents)
It took me 2 seconds (.06% of an hour) to "Process" this item to get the 8 cents.
So this is .08 per every 2 seconds (or .04 per every 1 second)
at 3600 seconds per hour,...this is .04*3600
...or 144 cents ($1.44)
This works out to be 1.44 per hour, this correct?
I have an electrical appliance (it's a CPAP machine) that's labelled its input power as:
100-240V, 0.3-0.5A, 50-60Hz

Can the Omars 40200mAh powerbank below support (ie power) the above CPAP?

From youtube url below, appears that Omars powerbank's AC output gives
110-230V, with amperage unspecified:

Does the powerbank auto-adjust its amperage output??

Just don't want to burn / cause over-current to the CPAP machine as this
voids the warranty
There is an inconsistency we identified through different reputable websites and textbooks about the degree of a polynomial. If there is an equation 3x^4 + x^3+ 5x^2, then would the degree be 4 or quartic? What is ultimately the difference between the the numerical value of the degree (4) and the type of polynomial (quartic)?
Hello and Good Afternoon Everyone,

            As an extension from a previously closed post, I recently read a theory which is being thrown around to help explain why Japanese women raised in Japan have very little breast cancer, while (genetically) Japanese women raised in the US have about the same rate as European-American women.   The theory suggest that plastics leach a material that mimics estrogen.   As clearly indicated within a previously closed post, the ingestion of micro-plastics over an extended period of time can certainly lead to a variety of physical abnormalities.  That said, I am wondering how micro-plastics can mimic estrogen.  Does this happen at a molecular level, meaning, the micro-plastics take on a similar structure as estrogen?  Or, does it try to mimic estrogen at a functional level?

            Any feedback given here will be greatly appreciated.

            Thank you

If we slide a 1/2 inside diameter pipe into a 3/4 inside diameter pipe how much watch pressure do we lose. Would that cause an issue when the house was sold and the buyer inspector noticed the weaker water pressure. They don't find everything because my inspector failed to find a gas leak as well as the fact that the roof had been in a fire years before. The water heater had propane fittings when the gas was natural gas and required natural gas fittings and the inspector missed that. Maybe they and the buyer think the water pressure through half inch pipe is normal.
The HTML5 canvas is an element that can generate graphics on the fly with JavaScript.

An example of it being used to graph equations can be found here:

I'm trying to figure out what math I will need to take to use the canvas to create interactive applications.
First at all sorry for my bad English.
I would like to create a kind of lock with no internet connexion and a RTC inside.
The lock will open with a code 8 chars long. The chars can be from 0 to 9 and from A to D. (I use a 16 key keypad)
The main idea is to have a code generator that encrypt with this 14 chars (0-9 and A-D) a code that says to the lock : you will have to open from this date until this date. And because i want the code to work only with the serial of one lock the code have to be compatible only with the lock I create the code for.

So to resume :
I have a lock with a 16 keys that are 0-9 and A-D the last two are R for reset and V like run :)
The lock have a serial number could be 000 to 999
When I create the code the code have to contain on max 8 chars : the start date, end date and the serial of the lock.

I've tried some ideas like work with a base 14 or something like. Use a kind of offset from the a defined date that is the same on the lock and the generator and then use the difference from this date to create the start date. Use the serial of the lock to do a CRC so when the lock check the code if the CRC is not ok then it won't open.

Well as you see I'm getting lost so if you have a simple idea please help

Thanks a lot
U = {digits}
E = {-3, -2, -1, 0, ...}

What are digits?

What is E intersection U
What can you tell me about Expert Systems?

I work for a technology company where there are hundreds of very smart engineers such as Electrical Engineers, Chemical Engineers and Manufacturing engineers.

They are all very smart and skilled. But the downside of every one is they are human.

I look at Supercomputers, like Summit, by IBM (200 Trillion computations per second), as well as Watson, which I know very little about, and I worry that Watson could wipe out small businesses like the one I work for.

How close are Expert Systems like Watson from performing completed designs, automatically? Let's say, for example, an integrated circuit.

I am curious to hear what a company that sees Watson as their true competition can do on a shoestring budget to harness their own engineers knowledge in a form that can be coalesced into a internal use only decision support system.

The sky's the limit on your theories...This is a wide open question, meant to tickle the mind.

The distance from the far wall to the back of the closed door = 11 feet. I was hoping for 12 feet (144 inches). Actually we need 140 inches.

The width of the upright dresser is 36 inches and the bed 74 inches and the fully opened door of 30 inches = 140,

If the dresser is turned to the side and open fully the left door of the dresser it's 28 inches so 8 inches gained. The bed is 74 inches. I assume the door is a standard 30 inches wide. If we put the back of the dresser against the far wall and open the door fully then we have then used 28 of the 132 inches (11 feet). Then the bed which adds 74 inches. So at this point the dresser doors and drawers will open as desired and the bed in place and we have used 28+74 inches = 102.

If the door is 30 inches wide then it appears the door can be opened fully and we are using 132 inches which is the full 11 feet but it could be tight if the home owner measured the 11 feet correctly. Since nothing much is gained by opening the door fully (since all that will be there is the foot of the bed) we can gain some inches by only opening the door by "x" number of degrees. I took geometry and so forth but I do not recall the formulas.

With the door fully opened it's 90 degrees from the door frame. If we open the door 45 degrees from fully opened or even 60 degrees, how many inches would we gain so the bed and dresser are not having to touch each other but still the door can be opened far enough to enter the room. The only reason a …
Is this Statistical Question as simple as i hope it is...

If I have a 5 Minute Time Bar for measuring trade volume within a Stock Symbol (any symbol)

Which is 300 seconds in total (5 x 60 seconds in a minute = 300)  

and i divide the 300 seconds into 10 equal segments of time -- 30 seconds each

and i measure the buying volume that took place from trades during EACH of the 10 segments --- HOW DO I MEASURE THE RATE OF BUYING PER SEGMENT IN RELATION TO THE 10 SEGMENTS to quantify how smooth was the trading done... Measure the Variance ? How do i measure the consistency of the buying ?

For example:

If each of the 10 segments of 30 seconds had 1000 shares traded then the rate of trade volume consistency of trading per each segment would be exact or the same rate flow of volume

1000  - 1st segment
1000 - 10th segment

But in the real world you get more inconsistent flow something like this... and i would like to understand how to measure the variance here ?

1250 - 1st segment
1500 - 10th segment
My bathroom tends to develop dark patches/spots of mildews/fungus
on the edges, toothbrushes, towels (that are hang in the bathroom),
shampoo caps,  practically anywhere in the bathroom.

I've thought of mopping the room dry but it's frequently used so this
is not practical.

These dark patches can't be scrubbed off & will need fungus gels to
be applied (& after a few hours, they can be removed).  They can
form in a matter of a day or two on towels.

Would a ventilator help?

Is there any chemical or how can I identify the source of the issue?
My old house's bathroom didn't have this issue.

What  else can I do to minimize these fungal formations?