# Thread: definite integral of cosine...

1. ## definite integral of cosine...

Earlier today i was asked what i thought was going to be a simple problem and i can't for the life of me get an answer. I was asked to come up with an equation for a curve that looks like -cos(theta) from 0 - PI, has a y-intercept of 10,000, and has an area underneath of 200,000. So I immediately think -x cos(theta) + 10001 where x is the amplitude scale factor. So shouldn't I be able to set the definite integral of this equation (from 0 - PI), equal to 200000 and solve for x? Once I wrote it out I saw the problem I was going to have evaluating sin(0) and sin(PI).

[int from 0-PI] (-xcos(theta) + 10001) dtheta = 200000
-x [int from 0-PI](cos(theta) dtheta) + [int from 0-PI](10001 dtheta) = 200000
-x [sin(PI) - sin(0)] + 10001(PI) = 200000
-x(0) + 10001(PI) = 200000
10001(PI) = 200000 ?????

What am I doing wrong because all I'm getting is 10001(PI) = 200000 because my x get's multiplied by the zero sin(PI) - sin(0) leave behind. Have i set this up entirely wrong?

thanks for any help

2. ## Re: definite integral of cosine...

Hi.

Your question could have been better expressed which is why I think nobody has responded yet. Nevertheless, I understand what you're saying and I think I've spotted a problem with your algebra.

What is the $\displaystyle y$-intercept of the function $\displaystyle f(\theta) = -x\cos(\theta) + 10,001$?

I think you will find that it isn't as you'd hoped! This +10,001 is the culprit. I'm sure you can see a way to fix this: just solve for $\displaystyle -x\cos(0) + c = 10,000$ and you should be on your way.

Your approach in general is good, however, so your instincts were right.

Happy solving.

3. ## Re: definite integral of cosine...

Hey thanks for the reply. Sorry I didn't read up on the proper formatting tags, and yes it looked terrible. Thanks for still taking the time. I don' t exactly understand what you meant by the following.

$\displaystyle -x\cos(0) + c = 10,000$

But it did make me reconsider how I was treating the amplitude scaling. I forgot that scaling $\displaystyle cos$ or $\displaystyle sin$ doesn't just expand the function upwards but also downwards. So attempting to solve for the scale factor without compensating in the vertical shift is what killed me. As the wave's amplitude gets scaled it needs to be shifted upwards again to maintain a $\displaystyle y_intercept$ at 10000. I used the following equation and came up with the desired result:

$\displaystyle \int_0^\pi ( -x\cos(\theta) + x + 10000)$

This way what ever scale gets applied to the wave, the wave will be raised that same amount so it still has $\displaystyle y-intercept$ at $\displaystyle 10000$.

The final value for $\displaystyle x$ is $\displaystyle approx. 63661.98$

I'm wondering if there's a way to do this without integrating.

Thanks a lot nimon!!
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "http://mathhelpforum.com/calculus/193841-definite-integral-cosine.html", "fetch_time": 1527312011000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2018-22/segments/1526794867309.73/warc/CC-MAIN-20180526033945-20180526053945-00489.warc.gz", "warc_record_offset": 186335026, "warc_record_length": 10588, "token_count": 778, "char_count": 2892, "score": 3.890625, "int_score": 4, "crawl": "CC-MAIN-2018-22", "snapshot_type": "latest", "language": "en", "language_score": 0.9625166654586792, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00053-of-00064.parquet"}