Jump to content
sigridhans

Finding the upper limit in a definite integral of a periodic function

Recommended Posts

Hello,

I am modelling the length of the growth season for 120 different years based on estimated daily temperature. The temperature is estimated from a periodic function: f(x)=D+A*sin(B(x+C), where the constants B and C are the same every year and A and D varies.

temp1990.JPG.8d6595e0bdb88d416bd519501a4e4448.JPG

So I would like to know when the area under each function equals 1200 as shown in the figure. I think it can be solved by finding the upper limit b in equation 1 when the lower limit a is known. For the year 1990 it would look like equation 2, and b will take a value between a and 365. Do you know how I can calculate this using Excel?

equation.JPG.a6ffc5396c64db791d8553e0dfe631f1.JPG

Thanks in advance,

 

Share this post


Link to post
Share on other sites
Posted (edited)

Let \(F\) be an antiderivative of your \(f;\) \(F = \int f(x) dx.\) That is easy, since \(f\) is a simple trigonometric function. Then solve \(F(b)-F(a) = 1200\) to determine \(a\). Dunno what Excel can do. If it cannot do it, then use something else which can, like Maple or Mathematica, or code Newton-Raphson yourself. Once you have the solution, use Excel to document the correct solution to your boss. 

Edited by taeto

Share this post


Link to post
Share on other sites
20 hours ago, taeto said:

Let F be an antiderivative of your f; F=f(x)dx. That is easy, since f is a simple trigonometric function. Then solve F(b)F(a)=1200 to determine a . Dunno what Excel can do. If it cannot do it, then use something else which can, like Maple or Mathematica, or code Newton-Raphson yourself. Once you have the solution, use Excel to document the correct solution to your boss. 

Thanks a lot. Sadly, I have forgotten most of my highschool math and I haven't learned to code yet.  I tried already with CAS but the program keeps telling me that I need to specify and gives me another equation as the solution. Below are the steps I did for the year 1990. Is it wrong so far?

equation1.JPG.3116e4f89110910c2b9e63aa995e07ed.JPG

Can I somehow isolate x in the equation below and specify that the answer is between a and 365?

equation2.JPG.4b068f63e647414df36c56335a9df251.JPG

Kind regards,

Share this post


Link to post
Share on other sites
Posted (edited)

You are married too much to notation. You have to look at the form of the equation that you want to solve, which is \( x + \alpha \cos (\beta x + \gamma ) = c,\) where you have known values for \(\alpha,\beta,\gamma, c.\) You get that form by adding \(F(a)\) on both sides of your last expression, and dividing through by \(D\) on both sides. Or in other words, you want a solution to the equation \(h(x)=0,\) where \(h(x) = x + \alpha \cos (\beta x + \gamma ) - c.\) This cannot be solved as a closed expression, all you can do is to find an approximate solution. But so far as I can determine, your constants have values that are results of measurements, so they are themselves approximate? First try to make a drawing of the graph \(y = h(x)\) to check if it is reasonable that there exists a solution to \(h(x) = 0\) or even several solutions. If some value \(x_0\) looks to be close to a solution, then use a software that is able to perform Newton's method for finding a zero of a function \(h(x)\) close to a starting value \(x = x_0.\) You may have to supply an expression for the derivative \(h'(x).\) But since it is essentially a basic trigonometric function, this is an easy task.

Edited by taeto

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.