1

So, I've been given an assignment for my new course and unfortunately, the introduction to Maxima tutorial is only the day before the assignment is due which I find to be rather poor planning.

Therefore, I'd like to get some help here to complete this assignment.

The question is this: enter image description here

I'm trying to plot this in Maxima, I'm able to plot the Airy functions just fine, but I can't seem to make any progress plotting f1 and f2. I've even tried plotting pieces of them at a time with no luck.

Clearly, I'm not understanding how to talk to Maxima, and I haven't found any walkthroughs on YouTube of similar problems.

This is what I have so far:

enter image description here

Surely, Maxima understands it if I've asked it to evaluate and it's giving me the correct expression back?

EDIT: This is the command I am using: enter image description here

Wolfram Alpha clearly plots this function as: enter image description here

Can anyone help?

C. Wolfe
  • 184
  • I used plot and copied the expressions for either f1 or f2 into the box but it always tells me that it's non-numerical and that there's nothing to plot. I've put these as-is into Wolfram Alpha and there definitely is something to plot. It's not the Airy functions that are the problem, its f1 and f2 that I can't get to plot. – C. Wolfe Sep 25 '19 at 15:49
  • 2
    In maxima, use %pi for the constant $\pi$. pi is just an ordinary variable (undefined in your case). Something like this f1(x) := 1/(sqrt(%pi)*(-x)^(1/4))*sin(2*(-x)^(3/2)/3 + %pi/4); plot2d([airy_ai(x),f1(x)],[x,-15,-0.05]); will work. – achille hui Sep 25 '19 at 17:20
  • 1
    MAGIC! Thanks Achille Hui!!!

    You should post this as an answer so I can give you rep

    – C. Wolfe Sep 25 '19 at 17:31

1 Answers1

2

In maxima, use %pi to input the constant $\pi$. pi is just an ordinary variable (undefined in your case). Something like the following

f1(x) := 1/(sqrt(%pi)*(-x)^(1/4))*sin(2*(-x)^(3/2)/3 + %pi/4);
plot2d([airy_ai(x),f1(x)],[x,-15,-0.05]);

will work.

achille hui
  • 122,701