0
$\begingroup$

I have a function which is:

Sqrt[3]/π Exp[y] Integrate[
 (p Cos[β y] + β q Sin[β y]) Sqrt[1 + β^2]/(p^2 + β^2 q^2), 
 {β, 0, ∞}
 ]

with

p = Sqrt[3*(1 + β^2)] Cosh[τ1 Sqrt[(1 + β^2)]] + 2 Sinh[τ1*Sqrt[(1 + β^2)]]

and

q = Sinh[τ1 Sqrt[(1 + β^2)]]

Is it possible to plot this function? I'm trying to put the expression of out[y] in Plot, but it seems that it does not work.

$\endgroup$
  • $\begingroup$ Tau1 is a number. $\endgroup$ – Francesco_Lobosco Jun 3 '18 at 7:17
  • $\begingroup$ Please edit your question to show us the code you are trying to use to Plot and the error you get. Include all the relevant variable values. All relevant information necessary to reproduce your problem should go in the question not the comments. $\endgroup$ – rhermans Jun 3 '18 at 8:57
0
$\begingroup$

Try something like this,

\[Tau]1 = 1;

p = Sqrt[3*(1 + \[Beta]^2)]*Cosh[\[Tau]1*Sqrt[(1 + \[Beta]^2)]] + 
   2*Sinh[\[Tau]1*Sqrt[(1 + \[Beta]^2)]];

q = Sinh[\[Tau]1*Sqrt[(1 + \[Beta]^2)]];

out[y_,N1_] := 
 Sqrt[3]/Pi*Exp[y]*
  NIntegrate[(p*Cos[\[Beta]*y] + \[Beta]*q*Sin[\[Beta]*y])*
    Sqrt[1 + \[Beta]^2]/(p^2 + \[Beta]^2*q^2), {\[Beta], 0, N1}]

Plot[out[y,10], {y, 0, 1}]

enter image description here

$\endgroup$
  • $\begingroup$ It seems that it works and it gives me the results that i want! Thank you! Could you explain me why it does not work with Infinity instead of N1? Just to not do the same error in the future. $\endgroup$ – Francesco_Lobosco Jun 3 '18 at 7:40
  • $\begingroup$ P.s. may i ask you another question? I have a system of two partial differential equation to solve and i want to increase the density of point (the solutions have to be evaluated numerically): is this possible in the NDSolve function? $\endgroup$ – Francesco_Lobosco Jun 3 '18 at 7:42
  • $\begingroup$ @Francesco_Lobosco It's very time consuming so I choose a finite upper limit. $\endgroup$ – zhk Jun 3 '18 at 10:47
  • $\begingroup$ @Francesco_Lobosco You can ask this new question in a new post. $\endgroup$ – zhk Jun 3 '18 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.