Solving Fredholm Equation of the second kind












6












$begingroup$


Consider the Fredholm Equation of the second kind,



$$phi(x) = 3 + lambda int_{0}^{pi} text{cos}(x-s) , phi(s) ,ds$$



Where the analytical solution is found as,



$$phi(x) = 3 + frac{6lambda}{1 - lambda frac{pi}{2}},text{sin}(x)$$



How could one use Mathematica to find a numerical solution to the same integral equation by using the method of successive approximations (i.e. the Neumann series approach)?










share|improve this question











$endgroup$

















    6












    $begingroup$


    Consider the Fredholm Equation of the second kind,



    $$phi(x) = 3 + lambda int_{0}^{pi} text{cos}(x-s) , phi(s) ,ds$$



    Where the analytical solution is found as,



    $$phi(x) = 3 + frac{6lambda}{1 - lambda frac{pi}{2}},text{sin}(x)$$



    How could one use Mathematica to find a numerical solution to the same integral equation by using the method of successive approximations (i.e. the Neumann series approach)?










    share|improve this question











    $endgroup$















      6












      6








      6





      $begingroup$


      Consider the Fredholm Equation of the second kind,



      $$phi(x) = 3 + lambda int_{0}^{pi} text{cos}(x-s) , phi(s) ,ds$$



      Where the analytical solution is found as,



      $$phi(x) = 3 + frac{6lambda}{1 - lambda frac{pi}{2}},text{sin}(x)$$



      How could one use Mathematica to find a numerical solution to the same integral equation by using the method of successive approximations (i.e. the Neumann series approach)?










      share|improve this question











      $endgroup$




      Consider the Fredholm Equation of the second kind,



      $$phi(x) = 3 + lambda int_{0}^{pi} text{cos}(x-s) , phi(s) ,ds$$



      Where the analytical solution is found as,



      $$phi(x) = 3 + frac{6lambda}{1 - lambda frac{pi}{2}},text{sin}(x)$$



      How could one use Mathematica to find a numerical solution to the same integral equation by using the method of successive approximations (i.e. the Neumann series approach)?







      numerical-integration integral-equations






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 2 at 20:25









      J. M. is computer-less

      97.3k10303463




      97.3k10303463










      asked Mar 1 at 19:28









      LightningStrikeLightningStrike

      735




      735






















          2 Answers
          2






          active

          oldest

          votes


















          8












          $begingroup$

          Use DSolve:



          PHI = 
          DSolveValue[ϕ[x] == 3 + λ Integrate[ Cos[x - s] ϕ[s], {s, 0, Pi}], ϕ, x]
          (*Function[{x}, (3 (-2 + π λ - 4 λ Sin[x]))/(-2 + π λ)]*)


          The solution can be further used in the form PHI[x].






          share|improve this answer











          $endgroup$













          • $begingroup$
            Thank you, but how can I use the function Mathematica returns to, say, investigate the convergence of the new $phi (x)$ function?
            $endgroup$
            – LightningStrike
            Mar 1 at 19:40






          • 1




            $begingroup$
            @ user57401 I modified my answer!
            $endgroup$
            – Ulrich Neumann
            Mar 1 at 19:57



















          3












          $begingroup$

          Following Weisstein, Eric W. "Integral Equation Neumann Series." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/IntegralEquationNeumannSeries.html, the Neumann series approximation is:



          n = 10;  (* for example *)
          ϕ[x_, 0] = 3;
          Do[ϕ[x_, j_] = 3 + λ Integrate[Cos[x - p] ϕ[p, j - 1], {p, 0, π}], {j, n}]


          The last term in the series ϕ[x,n] is the approximation to ϕ[x].



          Here is what Mathematica returns for ϕ[x,10].



          phi_of_ten



          To investigate convergence, I guess we could look at the difference ϕ[x,n] - ϕ[x] as n gets large, since you know ϕ[x].






          share|improve this answer











          $endgroup$













          • $begingroup$
            Thank you! When I try to run this, my output is returning the value of 3? How did you get Mathematica to return the series above for [Phi][10]?
            $endgroup$
            – LightningStrike
            Mar 1 at 20:27










          • $begingroup$
            Please clear out your variables, perhaps with Evaluation: Quit Kernel: Local. To print the final (nth) value: [Phi][x, n].
            $endgroup$
            – mjw
            Mar 1 at 20:52












          • $begingroup$
            Made some edits to my answer. Had a couple of typos. Within a function definition it is x_, otherwise x. Also, [Phi][x,j] needs two arguments, one for x and one for the jth approximation. Hope its clear.
            $endgroup$
            – mjw
            Mar 1 at 20:55












          • $begingroup$
            @m_goldberg, how do you post symbols rather than the clutzy [Phi] type of notation here?
            $endgroup$
            – mjw
            Mar 3 at 1:57






          • 1




            $begingroup$
            I use halirutan's plug-in. You can learn more about it here
            $endgroup$
            – m_goldberg
            Mar 3 at 2:53











          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: "387"
          };
          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: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f192434%2fsolving-fredholm-equation-of-the-second-kind%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









          8












          $begingroup$

          Use DSolve:



          PHI = 
          DSolveValue[ϕ[x] == 3 + λ Integrate[ Cos[x - s] ϕ[s], {s, 0, Pi}], ϕ, x]
          (*Function[{x}, (3 (-2 + π λ - 4 λ Sin[x]))/(-2 + π λ)]*)


          The solution can be further used in the form PHI[x].






          share|improve this answer











          $endgroup$













          • $begingroup$
            Thank you, but how can I use the function Mathematica returns to, say, investigate the convergence of the new $phi (x)$ function?
            $endgroup$
            – LightningStrike
            Mar 1 at 19:40






          • 1




            $begingroup$
            @ user57401 I modified my answer!
            $endgroup$
            – Ulrich Neumann
            Mar 1 at 19:57
















          8












          $begingroup$

          Use DSolve:



          PHI = 
          DSolveValue[ϕ[x] == 3 + λ Integrate[ Cos[x - s] ϕ[s], {s, 0, Pi}], ϕ, x]
          (*Function[{x}, (3 (-2 + π λ - 4 λ Sin[x]))/(-2 + π λ)]*)


          The solution can be further used in the form PHI[x].






          share|improve this answer











          $endgroup$













          • $begingroup$
            Thank you, but how can I use the function Mathematica returns to, say, investigate the convergence of the new $phi (x)$ function?
            $endgroup$
            – LightningStrike
            Mar 1 at 19:40






          • 1




            $begingroup$
            @ user57401 I modified my answer!
            $endgroup$
            – Ulrich Neumann
            Mar 1 at 19:57














          8












          8








          8





          $begingroup$

          Use DSolve:



          PHI = 
          DSolveValue[ϕ[x] == 3 + λ Integrate[ Cos[x - s] ϕ[s], {s, 0, Pi}], ϕ, x]
          (*Function[{x}, (3 (-2 + π λ - 4 λ Sin[x]))/(-2 + π λ)]*)


          The solution can be further used in the form PHI[x].






          share|improve this answer











          $endgroup$



          Use DSolve:



          PHI = 
          DSolveValue[ϕ[x] == 3 + λ Integrate[ Cos[x - s] ϕ[s], {s, 0, Pi}], ϕ, x]
          (*Function[{x}, (3 (-2 + π λ - 4 λ Sin[x]))/(-2 + π λ)]*)


          The solution can be further used in the form PHI[x].







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 2 at 23:50









          m_goldberg

          87.4k872198




          87.4k872198










          answered Mar 1 at 19:34









          Ulrich NeumannUlrich Neumann

          9,513616




          9,513616












          • $begingroup$
            Thank you, but how can I use the function Mathematica returns to, say, investigate the convergence of the new $phi (x)$ function?
            $endgroup$
            – LightningStrike
            Mar 1 at 19:40






          • 1




            $begingroup$
            @ user57401 I modified my answer!
            $endgroup$
            – Ulrich Neumann
            Mar 1 at 19:57


















          • $begingroup$
            Thank you, but how can I use the function Mathematica returns to, say, investigate the convergence of the new $phi (x)$ function?
            $endgroup$
            – LightningStrike
            Mar 1 at 19:40






          • 1




            $begingroup$
            @ user57401 I modified my answer!
            $endgroup$
            – Ulrich Neumann
            Mar 1 at 19:57
















          $begingroup$
          Thank you, but how can I use the function Mathematica returns to, say, investigate the convergence of the new $phi (x)$ function?
          $endgroup$
          – LightningStrike
          Mar 1 at 19:40




          $begingroup$
          Thank you, but how can I use the function Mathematica returns to, say, investigate the convergence of the new $phi (x)$ function?
          $endgroup$
          – LightningStrike
          Mar 1 at 19:40




          1




          1




          $begingroup$
          @ user57401 I modified my answer!
          $endgroup$
          – Ulrich Neumann
          Mar 1 at 19:57




          $begingroup$
          @ user57401 I modified my answer!
          $endgroup$
          – Ulrich Neumann
          Mar 1 at 19:57











          3












          $begingroup$

          Following Weisstein, Eric W. "Integral Equation Neumann Series." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/IntegralEquationNeumannSeries.html, the Neumann series approximation is:



          n = 10;  (* for example *)
          ϕ[x_, 0] = 3;
          Do[ϕ[x_, j_] = 3 + λ Integrate[Cos[x - p] ϕ[p, j - 1], {p, 0, π}], {j, n}]


          The last term in the series ϕ[x,n] is the approximation to ϕ[x].



          Here is what Mathematica returns for ϕ[x,10].



          phi_of_ten



          To investigate convergence, I guess we could look at the difference ϕ[x,n] - ϕ[x] as n gets large, since you know ϕ[x].






          share|improve this answer











          $endgroup$













          • $begingroup$
            Thank you! When I try to run this, my output is returning the value of 3? How did you get Mathematica to return the series above for [Phi][10]?
            $endgroup$
            – LightningStrike
            Mar 1 at 20:27










          • $begingroup$
            Please clear out your variables, perhaps with Evaluation: Quit Kernel: Local. To print the final (nth) value: [Phi][x, n].
            $endgroup$
            – mjw
            Mar 1 at 20:52












          • $begingroup$
            Made some edits to my answer. Had a couple of typos. Within a function definition it is x_, otherwise x. Also, [Phi][x,j] needs two arguments, one for x and one for the jth approximation. Hope its clear.
            $endgroup$
            – mjw
            Mar 1 at 20:55












          • $begingroup$
            @m_goldberg, how do you post symbols rather than the clutzy [Phi] type of notation here?
            $endgroup$
            – mjw
            Mar 3 at 1:57






          • 1




            $begingroup$
            I use halirutan's plug-in. You can learn more about it here
            $endgroup$
            – m_goldberg
            Mar 3 at 2:53
















          3












          $begingroup$

          Following Weisstein, Eric W. "Integral Equation Neumann Series." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/IntegralEquationNeumannSeries.html, the Neumann series approximation is:



          n = 10;  (* for example *)
          ϕ[x_, 0] = 3;
          Do[ϕ[x_, j_] = 3 + λ Integrate[Cos[x - p] ϕ[p, j - 1], {p, 0, π}], {j, n}]


          The last term in the series ϕ[x,n] is the approximation to ϕ[x].



          Here is what Mathematica returns for ϕ[x,10].



          phi_of_ten



          To investigate convergence, I guess we could look at the difference ϕ[x,n] - ϕ[x] as n gets large, since you know ϕ[x].






          share|improve this answer











          $endgroup$













          • $begingroup$
            Thank you! When I try to run this, my output is returning the value of 3? How did you get Mathematica to return the series above for [Phi][10]?
            $endgroup$
            – LightningStrike
            Mar 1 at 20:27










          • $begingroup$
            Please clear out your variables, perhaps with Evaluation: Quit Kernel: Local. To print the final (nth) value: [Phi][x, n].
            $endgroup$
            – mjw
            Mar 1 at 20:52












          • $begingroup$
            Made some edits to my answer. Had a couple of typos. Within a function definition it is x_, otherwise x. Also, [Phi][x,j] needs two arguments, one for x and one for the jth approximation. Hope its clear.
            $endgroup$
            – mjw
            Mar 1 at 20:55












          • $begingroup$
            @m_goldberg, how do you post symbols rather than the clutzy [Phi] type of notation here?
            $endgroup$
            – mjw
            Mar 3 at 1:57






          • 1




            $begingroup$
            I use halirutan's plug-in. You can learn more about it here
            $endgroup$
            – m_goldberg
            Mar 3 at 2:53














          3












          3








          3





          $begingroup$

          Following Weisstein, Eric W. "Integral Equation Neumann Series." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/IntegralEquationNeumannSeries.html, the Neumann series approximation is:



          n = 10;  (* for example *)
          ϕ[x_, 0] = 3;
          Do[ϕ[x_, j_] = 3 + λ Integrate[Cos[x - p] ϕ[p, j - 1], {p, 0, π}], {j, n}]


          The last term in the series ϕ[x,n] is the approximation to ϕ[x].



          Here is what Mathematica returns for ϕ[x,10].



          phi_of_ten



          To investigate convergence, I guess we could look at the difference ϕ[x,n] - ϕ[x] as n gets large, since you know ϕ[x].






          share|improve this answer











          $endgroup$



          Following Weisstein, Eric W. "Integral Equation Neumann Series." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/IntegralEquationNeumannSeries.html, the Neumann series approximation is:



          n = 10;  (* for example *)
          ϕ[x_, 0] = 3;
          Do[ϕ[x_, j_] = 3 + λ Integrate[Cos[x - p] ϕ[p, j - 1], {p, 0, π}], {j, n}]


          The last term in the series ϕ[x,n] is the approximation to ϕ[x].



          Here is what Mathematica returns for ϕ[x,10].



          phi_of_ten



          To investigate convergence, I guess we could look at the difference ϕ[x,n] - ϕ[x] as n gets large, since you know ϕ[x].







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited yesterday

























          answered Mar 1 at 20:12









          mjwmjw

          5429




          5429












          • $begingroup$
            Thank you! When I try to run this, my output is returning the value of 3? How did you get Mathematica to return the series above for [Phi][10]?
            $endgroup$
            – LightningStrike
            Mar 1 at 20:27










          • $begingroup$
            Please clear out your variables, perhaps with Evaluation: Quit Kernel: Local. To print the final (nth) value: [Phi][x, n].
            $endgroup$
            – mjw
            Mar 1 at 20:52












          • $begingroup$
            Made some edits to my answer. Had a couple of typos. Within a function definition it is x_, otherwise x. Also, [Phi][x,j] needs two arguments, one for x and one for the jth approximation. Hope its clear.
            $endgroup$
            – mjw
            Mar 1 at 20:55












          • $begingroup$
            @m_goldberg, how do you post symbols rather than the clutzy [Phi] type of notation here?
            $endgroup$
            – mjw
            Mar 3 at 1:57






          • 1




            $begingroup$
            I use halirutan's plug-in. You can learn more about it here
            $endgroup$
            – m_goldberg
            Mar 3 at 2:53


















          • $begingroup$
            Thank you! When I try to run this, my output is returning the value of 3? How did you get Mathematica to return the series above for [Phi][10]?
            $endgroup$
            – LightningStrike
            Mar 1 at 20:27










          • $begingroup$
            Please clear out your variables, perhaps with Evaluation: Quit Kernel: Local. To print the final (nth) value: [Phi][x, n].
            $endgroup$
            – mjw
            Mar 1 at 20:52












          • $begingroup$
            Made some edits to my answer. Had a couple of typos. Within a function definition it is x_, otherwise x. Also, [Phi][x,j] needs two arguments, one for x and one for the jth approximation. Hope its clear.
            $endgroup$
            – mjw
            Mar 1 at 20:55












          • $begingroup$
            @m_goldberg, how do you post symbols rather than the clutzy [Phi] type of notation here?
            $endgroup$
            – mjw
            Mar 3 at 1:57






          • 1




            $begingroup$
            I use halirutan's plug-in. You can learn more about it here
            $endgroup$
            – m_goldberg
            Mar 3 at 2:53
















          $begingroup$
          Thank you! When I try to run this, my output is returning the value of 3? How did you get Mathematica to return the series above for [Phi][10]?
          $endgroup$
          – LightningStrike
          Mar 1 at 20:27




          $begingroup$
          Thank you! When I try to run this, my output is returning the value of 3? How did you get Mathematica to return the series above for [Phi][10]?
          $endgroup$
          – LightningStrike
          Mar 1 at 20:27












          $begingroup$
          Please clear out your variables, perhaps with Evaluation: Quit Kernel: Local. To print the final (nth) value: [Phi][x, n].
          $endgroup$
          – mjw
          Mar 1 at 20:52






          $begingroup$
          Please clear out your variables, perhaps with Evaluation: Quit Kernel: Local. To print the final (nth) value: [Phi][x, n].
          $endgroup$
          – mjw
          Mar 1 at 20:52














          $begingroup$
          Made some edits to my answer. Had a couple of typos. Within a function definition it is x_, otherwise x. Also, [Phi][x,j] needs two arguments, one for x and one for the jth approximation. Hope its clear.
          $endgroup$
          – mjw
          Mar 1 at 20:55






          $begingroup$
          Made some edits to my answer. Had a couple of typos. Within a function definition it is x_, otherwise x. Also, [Phi][x,j] needs two arguments, one for x and one for the jth approximation. Hope its clear.
          $endgroup$
          – mjw
          Mar 1 at 20:55














          $begingroup$
          @m_goldberg, how do you post symbols rather than the clutzy [Phi] type of notation here?
          $endgroup$
          – mjw
          Mar 3 at 1:57




          $begingroup$
          @m_goldberg, how do you post symbols rather than the clutzy [Phi] type of notation here?
          $endgroup$
          – mjw
          Mar 3 at 1:57




          1




          1




          $begingroup$
          I use halirutan's plug-in. You can learn more about it here
          $endgroup$
          – m_goldberg
          Mar 3 at 2:53




          $begingroup$
          I use halirutan's plug-in. You can learn more about it here
          $endgroup$
          – m_goldberg
          Mar 3 at 2:53


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Mathematica 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%2fmathematica.stackexchange.com%2fquestions%2f192434%2fsolving-fredholm-equation-of-the-second-kind%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

          Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

          ComboBox Display Member on multiple fields

          Is it possible to collect Nectar points via Trainline?