I would like to plot a graph of this function:

enter image description here

Alternatively it could be expressed like this:

enter image description here

Either way, it's a symbolic expression, and as far as I'm aware, LaTeX can't solve it for me. Wolframalpha can't solve this either. Unfortunately, I don't have access to Mathematica to plot it.

Failing an exact plot of the function, I tried to simply capture its behaviour, as I know it should look similar to

enter image description here

The numbers on the axis and graph aren't important, I would simply like to be able to draw a graph like in the image. I can't think of a function that captures a similar behaviour however. Is there a way to literally draw a curve in LaTeX?

  • Welcome to TeX.SE. Have you tried Matlab? It can solve numerically this type of equations. – Diaa Oct 10 '19 at 23:55
  • Unfortunately I don't have that either, and I've already used the free trial. I suppose I can try to find someone with it, especially if it can solve the integral itself. – user1066 Oct 11 '19 at 0:27

Welcome! I am sure you can tweak the parameters to find an even better fit, but to very first approximation this is just a linear combination of two Gaussians of opposite signs, different amplitudes and widths (plus a shift by pi/2). You can play with the widths and prefactors to get a better fit.

 \addplot[domain=-10:10,samples=101,smooth] {pi/2+exp(-0.2*x*x)-(pi/2+1)*exp(-x*x)};

enter image description here

| improve this answer | |
  • It's perfect, thanks! I'd give it a vote if I could. – user1066 Oct 11 '19 at 0:46

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.