Question: C++ Goals: Developing problem-solving skills, declaring variables, multi-way branches, data validation. Problem: Astronomers have measured the magnitude (brightness) of a binary star as a function
C++


Goals: Developing problem-solving skills, declaring variables, multi-way branches, data validation. Problem: Astronomers have measured the magnitude (brightness) of a binary star as a function of time and found it to have periodicity (cycle) of 6.4 days. The magnitude varies as given below from times t- 0 days until t-0.9 days the magnitude is 2.5 from times t-0.9 days until t- 2.3 days the magnitude may be calculated by the formula 3.355 - ln(1.352 + cos(n*(t - 0.9)/0.7)) from times t 2.3 days until t-4.4 days the magnitude is 2.5 from times 4.4days until t 5.2 days the magnitude may be calculated by the formula 3.598 - In(1.998 + cos(t *(t - 4.4)/0.4)) from times 5.2 days until t- 6.4 days the magnitude is 25 At 6.4 days the cycle begins again as if the time was 0 days A graph for 2 cycles (12.8) days is given below 4.4 4.2 3.8 3.6 3.4 3.2 2.8 2.6 2.4 6 12 14
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
