Finding a series of cosines to represent the absolute value function
$begingroup$
Question: Prove the following identity:
$|x|=frac{pi}{2}+sum_{n=1}^{infty}frac{cos(2n-1)x}{(2n-1)^2}$. Our current topic is Fourier analysis, but I am truly lost here. I tried to compute the Fourier series, but it seemed extremely different than the wanted identity.
fourier-analysis
$endgroup$
add a comment |
$begingroup$
Question: Prove the following identity:
$|x|=frac{pi}{2}+sum_{n=1}^{infty}frac{cos(2n-1)x}{(2n-1)^2}$. Our current topic is Fourier analysis, but I am truly lost here. I tried to compute the Fourier series, but it seemed extremely different than the wanted identity.
fourier-analysis
$endgroup$
1
$begingroup$
Just a comment. Note that the right hand side is periodic while the left hand side is not (as it is written). What you are doing is in fact the Fourier series of a sawtooth-like function. So the result depends on which interval you pick. Common choices are $[-pi,pi]$ or $[0,2pi]$. Since the right hand side is an even function, your choice is the former. This may be the source of confusion.
$endgroup$
– lcv
Dec 13 '18 at 18:47
add a comment |
$begingroup$
Question: Prove the following identity:
$|x|=frac{pi}{2}+sum_{n=1}^{infty}frac{cos(2n-1)x}{(2n-1)^2}$. Our current topic is Fourier analysis, but I am truly lost here. I tried to compute the Fourier series, but it seemed extremely different than the wanted identity.
fourier-analysis
$endgroup$
Question: Prove the following identity:
$|x|=frac{pi}{2}+sum_{n=1}^{infty}frac{cos(2n-1)x}{(2n-1)^2}$. Our current topic is Fourier analysis, but I am truly lost here. I tried to compute the Fourier series, but it seemed extremely different than the wanted identity.
fourier-analysis
fourier-analysis
asked Dec 13 '18 at 17:00
Uri George PeterzilUri George Peterzil
949
949
1
$begingroup$
Just a comment. Note that the right hand side is periodic while the left hand side is not (as it is written). What you are doing is in fact the Fourier series of a sawtooth-like function. So the result depends on which interval you pick. Common choices are $[-pi,pi]$ or $[0,2pi]$. Since the right hand side is an even function, your choice is the former. This may be the source of confusion.
$endgroup$
– lcv
Dec 13 '18 at 18:47
add a comment |
1
$begingroup$
Just a comment. Note that the right hand side is periodic while the left hand side is not (as it is written). What you are doing is in fact the Fourier series of a sawtooth-like function. So the result depends on which interval you pick. Common choices are $[-pi,pi]$ or $[0,2pi]$. Since the right hand side is an even function, your choice is the former. This may be the source of confusion.
$endgroup$
– lcv
Dec 13 '18 at 18:47
1
1
$begingroup$
Just a comment. Note that the right hand side is periodic while the left hand side is not (as it is written). What you are doing is in fact the Fourier series of a sawtooth-like function. So the result depends on which interval you pick. Common choices are $[-pi,pi]$ or $[0,2pi]$. Since the right hand side is an even function, your choice is the former. This may be the source of confusion.
$endgroup$
– lcv
Dec 13 '18 at 18:47
$begingroup$
Just a comment. Note that the right hand side is periodic while the left hand side is not (as it is written). What you are doing is in fact the Fourier series of a sawtooth-like function. So the result depends on which interval you pick. Common choices are $[-pi,pi]$ or $[0,2pi]$. Since the right hand side is an even function, your choice is the former. This may be the source of confusion.
$endgroup$
– lcv
Dec 13 '18 at 18:47
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
You can evaluate it using complex fourier coefficients $c_k$. You get: $frac{1}{2pi}$($int_{0}^{-pi}xe^{-ikx}dx$ + $int_{0}^{pi}xe^{-ikx}dx$) which results after integration by parts in $frac{1}{pi k^2}((-1)^k-1)=c_k$ Now, we use $a_k=c_k+c_{-k}$ and $b_k=i(c_k-c_{-k})$ which is $0$.
$a_k$ becomes $frac{-4}{pi k^2}$ where k is odd,i.e. $k=2n-1$ and $a_0$, after evaluation, becomes $pi$
So now, you have : $$f(x)=frac{a_0}{2}+sum_{k=1}^{infty}a_kcos(kx), k=(2n-1)$$ So after plugging in all values, we get $$f(x)=|x|=frac{pi}{2}+frac{-4}{pi} sum_{n=1}^{infty} frac{1}{(2n-1)^2} cos((2n-1)x)$$
Hope this helps !
$endgroup$
add a comment |
$begingroup$
It should be
$$
|x|=frac{pi}{2}-frac{4}{pi}sum_{n=1}^{infty}frac{cos(2n-1)x}{(2n-1)^2}.
$$
Since $|x|$ is even, there are no sine terms, and the coefficient of $cos(n,x)$ is
$$
frac{1}{pi}int_{-pi}^pi|x|cos(n,x),dx=frac{2}{pi}int_0^pi xcos(n,x),dx,quad nge0.
$$
This integral easily computed using integration by parts.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3038288%2ffinding-a-series-of-cosines-to-represent-the-absolute-value-function%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
You can evaluate it using complex fourier coefficients $c_k$. You get: $frac{1}{2pi}$($int_{0}^{-pi}xe^{-ikx}dx$ + $int_{0}^{pi}xe^{-ikx}dx$) which results after integration by parts in $frac{1}{pi k^2}((-1)^k-1)=c_k$ Now, we use $a_k=c_k+c_{-k}$ and $b_k=i(c_k-c_{-k})$ which is $0$.
$a_k$ becomes $frac{-4}{pi k^2}$ where k is odd,i.e. $k=2n-1$ and $a_0$, after evaluation, becomes $pi$
So now, you have : $$f(x)=frac{a_0}{2}+sum_{k=1}^{infty}a_kcos(kx), k=(2n-1)$$ So after plugging in all values, we get $$f(x)=|x|=frac{pi}{2}+frac{-4}{pi} sum_{n=1}^{infty} frac{1}{(2n-1)^2} cos((2n-1)x)$$
Hope this helps !
$endgroup$
add a comment |
$begingroup$
You can evaluate it using complex fourier coefficients $c_k$. You get: $frac{1}{2pi}$($int_{0}^{-pi}xe^{-ikx}dx$ + $int_{0}^{pi}xe^{-ikx}dx$) which results after integration by parts in $frac{1}{pi k^2}((-1)^k-1)=c_k$ Now, we use $a_k=c_k+c_{-k}$ and $b_k=i(c_k-c_{-k})$ which is $0$.
$a_k$ becomes $frac{-4}{pi k^2}$ where k is odd,i.e. $k=2n-1$ and $a_0$, after evaluation, becomes $pi$
So now, you have : $$f(x)=frac{a_0}{2}+sum_{k=1}^{infty}a_kcos(kx), k=(2n-1)$$ So after plugging in all values, we get $$f(x)=|x|=frac{pi}{2}+frac{-4}{pi} sum_{n=1}^{infty} frac{1}{(2n-1)^2} cos((2n-1)x)$$
Hope this helps !
$endgroup$
add a comment |
$begingroup$
You can evaluate it using complex fourier coefficients $c_k$. You get: $frac{1}{2pi}$($int_{0}^{-pi}xe^{-ikx}dx$ + $int_{0}^{pi}xe^{-ikx}dx$) which results after integration by parts in $frac{1}{pi k^2}((-1)^k-1)=c_k$ Now, we use $a_k=c_k+c_{-k}$ and $b_k=i(c_k-c_{-k})$ which is $0$.
$a_k$ becomes $frac{-4}{pi k^2}$ where k is odd,i.e. $k=2n-1$ and $a_0$, after evaluation, becomes $pi$
So now, you have : $$f(x)=frac{a_0}{2}+sum_{k=1}^{infty}a_kcos(kx), k=(2n-1)$$ So after plugging in all values, we get $$f(x)=|x|=frac{pi}{2}+frac{-4}{pi} sum_{n=1}^{infty} frac{1}{(2n-1)^2} cos((2n-1)x)$$
Hope this helps !
$endgroup$
You can evaluate it using complex fourier coefficients $c_k$. You get: $frac{1}{2pi}$($int_{0}^{-pi}xe^{-ikx}dx$ + $int_{0}^{pi}xe^{-ikx}dx$) which results after integration by parts in $frac{1}{pi k^2}((-1)^k-1)=c_k$ Now, we use $a_k=c_k+c_{-k}$ and $b_k=i(c_k-c_{-k})$ which is $0$.
$a_k$ becomes $frac{-4}{pi k^2}$ where k is odd,i.e. $k=2n-1$ and $a_0$, after evaluation, becomes $pi$
So now, you have : $$f(x)=frac{a_0}{2}+sum_{k=1}^{infty}a_kcos(kx), k=(2n-1)$$ So after plugging in all values, we get $$f(x)=|x|=frac{pi}{2}+frac{-4}{pi} sum_{n=1}^{infty} frac{1}{(2n-1)^2} cos((2n-1)x)$$
Hope this helps !
answered Dec 13 '18 at 19:29
PoujhPoujh
616516
616516
add a comment |
add a comment |
$begingroup$
It should be
$$
|x|=frac{pi}{2}-frac{4}{pi}sum_{n=1}^{infty}frac{cos(2n-1)x}{(2n-1)^2}.
$$
Since $|x|$ is even, there are no sine terms, and the coefficient of $cos(n,x)$ is
$$
frac{1}{pi}int_{-pi}^pi|x|cos(n,x),dx=frac{2}{pi}int_0^pi xcos(n,x),dx,quad nge0.
$$
This integral easily computed using integration by parts.
$endgroup$
add a comment |
$begingroup$
It should be
$$
|x|=frac{pi}{2}-frac{4}{pi}sum_{n=1}^{infty}frac{cos(2n-1)x}{(2n-1)^2}.
$$
Since $|x|$ is even, there are no sine terms, and the coefficient of $cos(n,x)$ is
$$
frac{1}{pi}int_{-pi}^pi|x|cos(n,x),dx=frac{2}{pi}int_0^pi xcos(n,x),dx,quad nge0.
$$
This integral easily computed using integration by parts.
$endgroup$
add a comment |
$begingroup$
It should be
$$
|x|=frac{pi}{2}-frac{4}{pi}sum_{n=1}^{infty}frac{cos(2n-1)x}{(2n-1)^2}.
$$
Since $|x|$ is even, there are no sine terms, and the coefficient of $cos(n,x)$ is
$$
frac{1}{pi}int_{-pi}^pi|x|cos(n,x),dx=frac{2}{pi}int_0^pi xcos(n,x),dx,quad nge0.
$$
This integral easily computed using integration by parts.
$endgroup$
It should be
$$
|x|=frac{pi}{2}-frac{4}{pi}sum_{n=1}^{infty}frac{cos(2n-1)x}{(2n-1)^2}.
$$
Since $|x|$ is even, there are no sine terms, and the coefficient of $cos(n,x)$ is
$$
frac{1}{pi}int_{-pi}^pi|x|cos(n,x),dx=frac{2}{pi}int_0^pi xcos(n,x),dx,quad nge0.
$$
This integral easily computed using integration by parts.
answered Dec 13 '18 at 18:41
Julián AguirreJulián Aguirre
69.1k24096
69.1k24096
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3038288%2ffinding-a-series-of-cosines-to-represent-the-absolute-value-function%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
$begingroup$
Just a comment. Note that the right hand side is periodic while the left hand side is not (as it is written). What you are doing is in fact the Fourier series of a sawtooth-like function. So the result depends on which interval you pick. Common choices are $[-pi,pi]$ or $[0,2pi]$. Since the right hand side is an even function, your choice is the former. This may be the source of confusion.
$endgroup$
– lcv
Dec 13 '18 at 18:47