Solve ODE using Fourier series.












2












$begingroup$



I have that



$$f(x)=frac{4}{3}+frac{2}{pi^2}sum_{ninmathbb{Z}}frac{(-1)^n(1+ipi
n)}{n^2}e^{ipi n x}, quad nneq0tag1$$



and I want to find a 2-periodic function $y(x)$ that solves the
following diff-equation



$$2y''-y'-y=f(x).tag{2}$$




Since $(1)$ is a linear ODE I know that it's solution is of the form $y(x)=y_h+y_p.$ Finding $y_h$ is trivial and done by solving the characteristic equation. I found it to be $y_h=C_1e^x+C_2e^{-x/2}.$



For $y_p$, I need to use $f(x)$ somehow, I could not find any good example in the book on how to do this. I only found one video on youtube but it does not really seem to be that similar to my problem.



I want to follow the answer in this thread but I can't seem to grasp the mechanics of what he means. Can someone show me how to go about this?










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    Write the solution in its series form and plug it into the ODE to obtain a system of algebraic equations in terms of the Fourier coefficients. You already have $f$ in series form so this should be fairly straightforward
    $endgroup$
    – Dylan
    Jan 24 at 12:02












  • $begingroup$
    @Dylan - How do I write the solution in series form if I don't know the solution yet?
    $endgroup$
    – Parseval
    Jan 24 at 12:34










  • $begingroup$
    You write it as an unknown series, and derive the coefficients from the resulting equations. See my answer.
    $endgroup$
    – Dylan
    Jan 24 at 13:00


















2












$begingroup$



I have that



$$f(x)=frac{4}{3}+frac{2}{pi^2}sum_{ninmathbb{Z}}frac{(-1)^n(1+ipi
n)}{n^2}e^{ipi n x}, quad nneq0tag1$$



and I want to find a 2-periodic function $y(x)$ that solves the
following diff-equation



$$2y''-y'-y=f(x).tag{2}$$




Since $(1)$ is a linear ODE I know that it's solution is of the form $y(x)=y_h+y_p.$ Finding $y_h$ is trivial and done by solving the characteristic equation. I found it to be $y_h=C_1e^x+C_2e^{-x/2}.$



For $y_p$, I need to use $f(x)$ somehow, I could not find any good example in the book on how to do this. I only found one video on youtube but it does not really seem to be that similar to my problem.



I want to follow the answer in this thread but I can't seem to grasp the mechanics of what he means. Can someone show me how to go about this?










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    Write the solution in its series form and plug it into the ODE to obtain a system of algebraic equations in terms of the Fourier coefficients. You already have $f$ in series form so this should be fairly straightforward
    $endgroup$
    – Dylan
    Jan 24 at 12:02












  • $begingroup$
    @Dylan - How do I write the solution in series form if I don't know the solution yet?
    $endgroup$
    – Parseval
    Jan 24 at 12:34










  • $begingroup$
    You write it as an unknown series, and derive the coefficients from the resulting equations. See my answer.
    $endgroup$
    – Dylan
    Jan 24 at 13:00
















2












2








2





$begingroup$



I have that



$$f(x)=frac{4}{3}+frac{2}{pi^2}sum_{ninmathbb{Z}}frac{(-1)^n(1+ipi
n)}{n^2}e^{ipi n x}, quad nneq0tag1$$



and I want to find a 2-periodic function $y(x)$ that solves the
following diff-equation



$$2y''-y'-y=f(x).tag{2}$$




Since $(1)$ is a linear ODE I know that it's solution is of the form $y(x)=y_h+y_p.$ Finding $y_h$ is trivial and done by solving the characteristic equation. I found it to be $y_h=C_1e^x+C_2e^{-x/2}.$



For $y_p$, I need to use $f(x)$ somehow, I could not find any good example in the book on how to do this. I only found one video on youtube but it does not really seem to be that similar to my problem.



I want to follow the answer in this thread but I can't seem to grasp the mechanics of what he means. Can someone show me how to go about this?










share|cite|improve this question











$endgroup$





I have that



$$f(x)=frac{4}{3}+frac{2}{pi^2}sum_{ninmathbb{Z}}frac{(-1)^n(1+ipi
n)}{n^2}e^{ipi n x}, quad nneq0tag1$$



and I want to find a 2-periodic function $y(x)$ that solves the
following diff-equation



$$2y''-y'-y=f(x).tag{2}$$




Since $(1)$ is a linear ODE I know that it's solution is of the form $y(x)=y_h+y_p.$ Finding $y_h$ is trivial and done by solving the characteristic equation. I found it to be $y_h=C_1e^x+C_2e^{-x/2}.$



For $y_p$, I need to use $f(x)$ somehow, I could not find any good example in the book on how to do this. I only found one video on youtube but it does not really seem to be that similar to my problem.



I want to follow the answer in this thread but I can't seem to grasp the mechanics of what he means. Can someone show me how to go about this?







ordinary-differential-equations fourier-analysis fourier-series






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 24 at 12:08









Dylan

13.6k31027




13.6k31027










asked Jan 24 at 11:55









ParsevalParseval

2,9881719




2,9881719








  • 1




    $begingroup$
    Write the solution in its series form and plug it into the ODE to obtain a system of algebraic equations in terms of the Fourier coefficients. You already have $f$ in series form so this should be fairly straightforward
    $endgroup$
    – Dylan
    Jan 24 at 12:02












  • $begingroup$
    @Dylan - How do I write the solution in series form if I don't know the solution yet?
    $endgroup$
    – Parseval
    Jan 24 at 12:34










  • $begingroup$
    You write it as an unknown series, and derive the coefficients from the resulting equations. See my answer.
    $endgroup$
    – Dylan
    Jan 24 at 13:00
















  • 1




    $begingroup$
    Write the solution in its series form and plug it into the ODE to obtain a system of algebraic equations in terms of the Fourier coefficients. You already have $f$ in series form so this should be fairly straightforward
    $endgroup$
    – Dylan
    Jan 24 at 12:02












  • $begingroup$
    @Dylan - How do I write the solution in series form if I don't know the solution yet?
    $endgroup$
    – Parseval
    Jan 24 at 12:34










  • $begingroup$
    You write it as an unknown series, and derive the coefficients from the resulting equations. See my answer.
    $endgroup$
    – Dylan
    Jan 24 at 13:00










1




1




$begingroup$
Write the solution in its series form and plug it into the ODE to obtain a system of algebraic equations in terms of the Fourier coefficients. You already have $f$ in series form so this should be fairly straightforward
$endgroup$
– Dylan
Jan 24 at 12:02






$begingroup$
Write the solution in its series form and plug it into the ODE to obtain a system of algebraic equations in terms of the Fourier coefficients. You already have $f$ in series form so this should be fairly straightforward
$endgroup$
– Dylan
Jan 24 at 12:02














$begingroup$
@Dylan - How do I write the solution in series form if I don't know the solution yet?
$endgroup$
– Parseval
Jan 24 at 12:34




$begingroup$
@Dylan - How do I write the solution in series form if I don't know the solution yet?
$endgroup$
– Parseval
Jan 24 at 12:34












$begingroup$
You write it as an unknown series, and derive the coefficients from the resulting equations. See my answer.
$endgroup$
– Dylan
Jan 24 at 13:00






$begingroup$
You write it as an unknown series, and derive the coefficients from the resulting equations. See my answer.
$endgroup$
– Dylan
Jan 24 at 13:00












1 Answer
1






active

oldest

votes


















1












$begingroup$

A $2$-periodic function has the form



$$ y(x) = c_0 + sum_{n=pm 1}^{pminfty} c_n e^{inpi x} $$



where $c_n$ are unknown coefficients. Plug this expression into the ODE (differentiating term-wise)



$$ 2y'' - y' - y = - c_0 - sum_{n=pm1}^{pminfty} (n^2pi^2 + inpi + 1)c_n e^{inpi x} $$



Comparing coefficients gives



begin{align}
-c_0 &= frac43 \
-(n^2pi^2+inpi+1)c_n &= frac{2}{pi^2}(-1)^n frac{1+inpi}{n^2}
end{align}



The homogeneous solution is not periodic so it isn't needed.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    This is great, thank you! I have a question, what is meant by "2-periodic"? and how does one see that the substitution for $y(x)$ is 2-periodic?
    $endgroup$
    – Parseval
    Jan 24 at 14:32










  • $begingroup$
    $2$-periodic means it has a period of $2$, i.e. $y(x+2)=y(x)$. How did you obtain the Fourier series of $f(x)$ in your earlier question? How did you know it has terms in $e^{inpi x}$? How did you get through that question without knowing what it means?
    $endgroup$
    – Dylan
    Jan 24 at 14:45










  • $begingroup$
    Okay, maybe my question was a bit misleading. I know what periodicity refers to, however in my book it says that one can express a function $f$ on the form $$f(x)=sum_{-infty}^{infty}c_n e^{i n x},$$ so I'm wondering why you substituted $$y(x)=c_0+sum_{-infty}^{infty}c_ne^{inpi x}.$$ Why do you latch on the $c_0$ when they excluded it in my book?
    $endgroup$
    – Parseval
    Jan 24 at 14:56






  • 1




    $begingroup$
    The first series does include a constant term. What is $e^{inx}$ when $n=0$?
    $endgroup$
    – Dylan
    Jan 24 at 15:03










  • $begingroup$
    Ok I got it now! Thanks.
    $endgroup$
    – Parseval
    Jan 24 at 15:08











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3085787%2fsolve-ode-using-fourier-series%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1












$begingroup$

A $2$-periodic function has the form



$$ y(x) = c_0 + sum_{n=pm 1}^{pminfty} c_n e^{inpi x} $$



where $c_n$ are unknown coefficients. Plug this expression into the ODE (differentiating term-wise)



$$ 2y'' - y' - y = - c_0 - sum_{n=pm1}^{pminfty} (n^2pi^2 + inpi + 1)c_n e^{inpi x} $$



Comparing coefficients gives



begin{align}
-c_0 &= frac43 \
-(n^2pi^2+inpi+1)c_n &= frac{2}{pi^2}(-1)^n frac{1+inpi}{n^2}
end{align}



The homogeneous solution is not periodic so it isn't needed.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    This is great, thank you! I have a question, what is meant by "2-periodic"? and how does one see that the substitution for $y(x)$ is 2-periodic?
    $endgroup$
    – Parseval
    Jan 24 at 14:32










  • $begingroup$
    $2$-periodic means it has a period of $2$, i.e. $y(x+2)=y(x)$. How did you obtain the Fourier series of $f(x)$ in your earlier question? How did you know it has terms in $e^{inpi x}$? How did you get through that question without knowing what it means?
    $endgroup$
    – Dylan
    Jan 24 at 14:45










  • $begingroup$
    Okay, maybe my question was a bit misleading. I know what periodicity refers to, however in my book it says that one can express a function $f$ on the form $$f(x)=sum_{-infty}^{infty}c_n e^{i n x},$$ so I'm wondering why you substituted $$y(x)=c_0+sum_{-infty}^{infty}c_ne^{inpi x}.$$ Why do you latch on the $c_0$ when they excluded it in my book?
    $endgroup$
    – Parseval
    Jan 24 at 14:56






  • 1




    $begingroup$
    The first series does include a constant term. What is $e^{inx}$ when $n=0$?
    $endgroup$
    – Dylan
    Jan 24 at 15:03










  • $begingroup$
    Ok I got it now! Thanks.
    $endgroup$
    – Parseval
    Jan 24 at 15:08
















1












$begingroup$

A $2$-periodic function has the form



$$ y(x) = c_0 + sum_{n=pm 1}^{pminfty} c_n e^{inpi x} $$



where $c_n$ are unknown coefficients. Plug this expression into the ODE (differentiating term-wise)



$$ 2y'' - y' - y = - c_0 - sum_{n=pm1}^{pminfty} (n^2pi^2 + inpi + 1)c_n e^{inpi x} $$



Comparing coefficients gives



begin{align}
-c_0 &= frac43 \
-(n^2pi^2+inpi+1)c_n &= frac{2}{pi^2}(-1)^n frac{1+inpi}{n^2}
end{align}



The homogeneous solution is not periodic so it isn't needed.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    This is great, thank you! I have a question, what is meant by "2-periodic"? and how does one see that the substitution for $y(x)$ is 2-periodic?
    $endgroup$
    – Parseval
    Jan 24 at 14:32










  • $begingroup$
    $2$-periodic means it has a period of $2$, i.e. $y(x+2)=y(x)$. How did you obtain the Fourier series of $f(x)$ in your earlier question? How did you know it has terms in $e^{inpi x}$? How did you get through that question without knowing what it means?
    $endgroup$
    – Dylan
    Jan 24 at 14:45










  • $begingroup$
    Okay, maybe my question was a bit misleading. I know what periodicity refers to, however in my book it says that one can express a function $f$ on the form $$f(x)=sum_{-infty}^{infty}c_n e^{i n x},$$ so I'm wondering why you substituted $$y(x)=c_0+sum_{-infty}^{infty}c_ne^{inpi x}.$$ Why do you latch on the $c_0$ when they excluded it in my book?
    $endgroup$
    – Parseval
    Jan 24 at 14:56






  • 1




    $begingroup$
    The first series does include a constant term. What is $e^{inx}$ when $n=0$?
    $endgroup$
    – Dylan
    Jan 24 at 15:03










  • $begingroup$
    Ok I got it now! Thanks.
    $endgroup$
    – Parseval
    Jan 24 at 15:08














1












1








1





$begingroup$

A $2$-periodic function has the form



$$ y(x) = c_0 + sum_{n=pm 1}^{pminfty} c_n e^{inpi x} $$



where $c_n$ are unknown coefficients. Plug this expression into the ODE (differentiating term-wise)



$$ 2y'' - y' - y = - c_0 - sum_{n=pm1}^{pminfty} (n^2pi^2 + inpi + 1)c_n e^{inpi x} $$



Comparing coefficients gives



begin{align}
-c_0 &= frac43 \
-(n^2pi^2+inpi+1)c_n &= frac{2}{pi^2}(-1)^n frac{1+inpi}{n^2}
end{align}



The homogeneous solution is not periodic so it isn't needed.






share|cite|improve this answer









$endgroup$



A $2$-periodic function has the form



$$ y(x) = c_0 + sum_{n=pm 1}^{pminfty} c_n e^{inpi x} $$



where $c_n$ are unknown coefficients. Plug this expression into the ODE (differentiating term-wise)



$$ 2y'' - y' - y = - c_0 - sum_{n=pm1}^{pminfty} (n^2pi^2 + inpi + 1)c_n e^{inpi x} $$



Comparing coefficients gives



begin{align}
-c_0 &= frac43 \
-(n^2pi^2+inpi+1)c_n &= frac{2}{pi^2}(-1)^n frac{1+inpi}{n^2}
end{align}



The homogeneous solution is not periodic so it isn't needed.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Jan 24 at 12:54









DylanDylan

13.6k31027




13.6k31027












  • $begingroup$
    This is great, thank you! I have a question, what is meant by "2-periodic"? and how does one see that the substitution for $y(x)$ is 2-periodic?
    $endgroup$
    – Parseval
    Jan 24 at 14:32










  • $begingroup$
    $2$-periodic means it has a period of $2$, i.e. $y(x+2)=y(x)$. How did you obtain the Fourier series of $f(x)$ in your earlier question? How did you know it has terms in $e^{inpi x}$? How did you get through that question without knowing what it means?
    $endgroup$
    – Dylan
    Jan 24 at 14:45










  • $begingroup$
    Okay, maybe my question was a bit misleading. I know what periodicity refers to, however in my book it says that one can express a function $f$ on the form $$f(x)=sum_{-infty}^{infty}c_n e^{i n x},$$ so I'm wondering why you substituted $$y(x)=c_0+sum_{-infty}^{infty}c_ne^{inpi x}.$$ Why do you latch on the $c_0$ when they excluded it in my book?
    $endgroup$
    – Parseval
    Jan 24 at 14:56






  • 1




    $begingroup$
    The first series does include a constant term. What is $e^{inx}$ when $n=0$?
    $endgroup$
    – Dylan
    Jan 24 at 15:03










  • $begingroup$
    Ok I got it now! Thanks.
    $endgroup$
    – Parseval
    Jan 24 at 15:08


















  • $begingroup$
    This is great, thank you! I have a question, what is meant by "2-periodic"? and how does one see that the substitution for $y(x)$ is 2-periodic?
    $endgroup$
    – Parseval
    Jan 24 at 14:32










  • $begingroup$
    $2$-periodic means it has a period of $2$, i.e. $y(x+2)=y(x)$. How did you obtain the Fourier series of $f(x)$ in your earlier question? How did you know it has terms in $e^{inpi x}$? How did you get through that question without knowing what it means?
    $endgroup$
    – Dylan
    Jan 24 at 14:45










  • $begingroup$
    Okay, maybe my question was a bit misleading. I know what periodicity refers to, however in my book it says that one can express a function $f$ on the form $$f(x)=sum_{-infty}^{infty}c_n e^{i n x},$$ so I'm wondering why you substituted $$y(x)=c_0+sum_{-infty}^{infty}c_ne^{inpi x}.$$ Why do you latch on the $c_0$ when they excluded it in my book?
    $endgroup$
    – Parseval
    Jan 24 at 14:56






  • 1




    $begingroup$
    The first series does include a constant term. What is $e^{inx}$ when $n=0$?
    $endgroup$
    – Dylan
    Jan 24 at 15:03










  • $begingroup$
    Ok I got it now! Thanks.
    $endgroup$
    – Parseval
    Jan 24 at 15:08
















$begingroup$
This is great, thank you! I have a question, what is meant by "2-periodic"? and how does one see that the substitution for $y(x)$ is 2-periodic?
$endgroup$
– Parseval
Jan 24 at 14:32




$begingroup$
This is great, thank you! I have a question, what is meant by "2-periodic"? and how does one see that the substitution for $y(x)$ is 2-periodic?
$endgroup$
– Parseval
Jan 24 at 14:32












$begingroup$
$2$-periodic means it has a period of $2$, i.e. $y(x+2)=y(x)$. How did you obtain the Fourier series of $f(x)$ in your earlier question? How did you know it has terms in $e^{inpi x}$? How did you get through that question without knowing what it means?
$endgroup$
– Dylan
Jan 24 at 14:45




$begingroup$
$2$-periodic means it has a period of $2$, i.e. $y(x+2)=y(x)$. How did you obtain the Fourier series of $f(x)$ in your earlier question? How did you know it has terms in $e^{inpi x}$? How did you get through that question without knowing what it means?
$endgroup$
– Dylan
Jan 24 at 14:45












$begingroup$
Okay, maybe my question was a bit misleading. I know what periodicity refers to, however in my book it says that one can express a function $f$ on the form $$f(x)=sum_{-infty}^{infty}c_n e^{i n x},$$ so I'm wondering why you substituted $$y(x)=c_0+sum_{-infty}^{infty}c_ne^{inpi x}.$$ Why do you latch on the $c_0$ when they excluded it in my book?
$endgroup$
– Parseval
Jan 24 at 14:56




$begingroup$
Okay, maybe my question was a bit misleading. I know what periodicity refers to, however in my book it says that one can express a function $f$ on the form $$f(x)=sum_{-infty}^{infty}c_n e^{i n x},$$ so I'm wondering why you substituted $$y(x)=c_0+sum_{-infty}^{infty}c_ne^{inpi x}.$$ Why do you latch on the $c_0$ when they excluded it in my book?
$endgroup$
– Parseval
Jan 24 at 14:56




1




1




$begingroup$
The first series does include a constant term. What is $e^{inx}$ when $n=0$?
$endgroup$
– Dylan
Jan 24 at 15:03




$begingroup$
The first series does include a constant term. What is $e^{inx}$ when $n=0$?
$endgroup$
– Dylan
Jan 24 at 15:03












$begingroup$
Ok I got it now! Thanks.
$endgroup$
– Parseval
Jan 24 at 15:08




$begingroup$
Ok I got it now! Thanks.
$endgroup$
– Parseval
Jan 24 at 15:08


















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3085787%2fsolve-ode-using-fourier-series%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Mario Kart Wii

The Binding of Isaac: Rebirth/Afterbirth

What does “Dominus providebit” mean?