Message Boards Message Boards

Plotting the solution of an integral equation

Posted 2 years ago

Hello All, I tried plotting the solution of the integral equations in this notebook, but the plot function gives empty plot. The solution contains Hypergeometric functions. Please guide what needs correction. Thanks.

10 Replies

Thanks alot both of you! Grateful for your help!

I don't know what functions are plotted in the book. However, in your own plot you need to increase the precision because there are numerical instabilities for larger values of T:

diffExact = Rationalize[diff, 0];
Plot[diffExact, {T, 0, 10}, WorkingPrecision -> 30, 
 PlotRange -> {-2, 1.5}]
POSTED BY: Gianluca Gorni

Your equation does not depend on x, only on T:

diff = Subtract @@ Simplify[sol, T > 0];
Plot[diff, {T, 0, 2}]
FindRoot[diff == 0, {T, 1.7}]

There is a value of T that makes the two integrals equal.

POSTED BY: Gianluca Gorni

Alright. so, the plot should be over a wide range of values of T, but when i change the range in the Plot command from say {T, 0, 10}, the values go infinite. i have attached the updated notebook in which i have tried to plot T from 0 to 10. And the attached image shows how the actual plot should look like(here i have used k=2.5, so blue curve is relevant).

The actual plot looks like this

A = 0.3136; B = 0.0692; c0 = 0.6207; a = 1.29; b = 0.1101; c = 3.014;
sol[T_, k_] := 
 NIntegrate[x (1 + x/((k - 3/2) T))^(-k - 1), {x, 0, Infinity}] - 
  NIntegrate[
   x (1 + x/((k - 3/2) T))^(-k - 
     1) (c*E^(-(x/a)) - c*E^(-x/b) - B*E^(-c0*x) + A), {x, 0, 
    Infinity}]
Plot[sol[T, 2.5], {T, 0, 3}](*for: k=2.5*)
FindRoot[sol[T, 2.5], {T, 2},WorkingPrecision -> 20]
(*{T ->1.7115048830163596308}*)

The plot is different because it is not normalized.

POSTED BY: Mariusz Iwaniuk

Oh okay. So, how can I normalize it?

I don't have your book.

POSTED BY: Mariusz Iwaniuk

Your second integral is poorly typed. You almost surely need to insert a space between c and e. I wonder if c and C are meant to be different parameters. Then you set up an equation but you don't solve it. The equation does not depend on x, but you try to plot it as a function of x, which does not make much sense. Also, before plotting I suppose you need to give numerical values to most parameters.

POSTED BY: Gianluca Gorni

This is the updated notebook with numerical values for the coefficients(and yes, c and C are two different parameters). Now, the notebook contains only one integral equation whose solution needs to be plotted for the value of k=2.5. Thanks for your response.

You what plot of T vs x, but where is x in integral solution ?There is only T.

POSTED BY: Mariusz Iwaniuk
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract