Post Reply 
Plotting an integral
10-12-2019, 07:00 PM
Post: #1
Plotting an integral
How do I graph: integral of sin((pi * X^2)/2) from 0 to X on the Prime? It is straight forward on the CASIO fx-CG50...
Find all posts by this user
Quote this message in a reply
10-12-2019, 07:16 PM
Post: #2
RE: Plotting an integral
Instead of taking it with respect to X, replace the variable in the equation with a different one such as U.
So you'll input: the integral of sin((pi * U^2)/2) from 0 to X with respect to U.

Cemetech | YouTube
Visit this user's website Find all posts by this user
Quote this message in a reply
10-12-2019, 07:27 PM
Post: #3
RE: Plotting an integral
(10-12-2019 07:00 PM)lrdheat Wrote:  How do I graph: integral of sin((pi * X^2)/2) from 0 to X on the Prime? It is straight forward on the CASIO fx-CG50...

You are using X for two different things in the same expression. Since you are using X in the limit, you need to use a different variable of integration. Such as

integral of sin((pi * T^2)/2) dT from 0 to X
ie,
∫(SIN((π*T^2/2)),T,0,X)

Even if your calculator allows it, using the same variable for two different meanings like this is considered improper in math. When a student writes something like this, I might not take off points, but I'd write something snarky like "I think you misspelled 't' :-)"
Find all posts by this user
Quote this message in a reply
10-12-2019, 07:55 PM
Post: #4
RE: Plotting an integral
Wow! And so much quicker than the CASIO. Also, for extremums, Prime was quick where CASIO was very slow, and would be impossibly slow to choose the extremums that I might be interested in finding.

I had to use dT instead of using dX with a domain of 0 to T. I am still a little confused as to why, mathematically, it is incorrect to have everything in terms of X...
Find all posts by this user
Quote this message in a reply
10-13-2019, 03:00 AM
Post: #5
RE: Plotting an integral
(10-12-2019 07:55 PM)lrdheat Wrote:  I am still a little confused as to why, mathematically, it is incorrect to have everything in terms of X...

[teacher hat on]
If you were to define a function
f(x)=integral from 0 to x of sin(x) dx
then you are using the first x as the limit and the other x's as the variable of integration. To calculate f(3), you substitute 3 in for x and get
f(3) = integral from 0 to 3 of sin(3) d3
which of course is meaningless.

If you instead wrote
f(x)=integral from 0 to x of sin(t) dt
Then f(3)=integral from 0 to 3 of sin(t) dt
The x has the fixed value of 3 while t varies from 0 to 3.

In the function app, if you enter
F1(X)=∫(SIN((π*T^2/2)),T,0,X)
F2(X)=∫(SIN((π*X^2/2)),X,0,X)
and then from Home enter F1(3) you get the correct result of ∫(SIN((π*T^2/2)),T,0,3), but with F2(3) you'll get an error message because it's trying evaluate ∫(SIN((π*3^2/2)),3,0,3)
[teacher hat off]
Find all posts by this user
Quote this message in a reply
10-13-2019, 04:06 AM
Post: #6
RE: Plotting an integral
Excellent clarification. Thank you!
Find all posts by this user
Quote this message in a reply
10-13-2019, 10:47 AM
Post: #7
RE: Plotting an integral
(10-12-2019 07:55 PM)lrdheat Wrote:  Wow! And so much quicker than the CASIO.

Just curious, how long does it take your Casio fx-CG50 to graph this integral, say from -3<x<3 and -1<y<1 ?

This is the type of calculation where the G2 really shines.
Prime G1: ~15 sec
Prime G2: ~4 sec
Find all posts by this user
Quote this message in a reply
10-13-2019, 11:14 AM
Post: #8
RE: Plotting an integral
Okay, one more thing ...

To graph this function even faster, use the Geometry app and enter

GA:= plotode(sin(π*x^2/2),[x,y],[0,0]);

When you hit Plot, the graph should appear almost instantaneously. It's not quite as accurate as it is using approximations, but it sure is fast.
Find all posts by this user
Quote this message in a reply
10-13-2019, 12:56 PM
Post: #9
RE: Plotting an integral
(10-13-2019 10:47 AM)Wes Loewer Wrote:  
(10-12-2019 07:55 PM)lrdheat Wrote:  Wow! And so much quicker than the CASIO.

Just curious, how long does it take your Casio fx-CG50 to graph this integral, say from -3<x<3 and -1<y<1 ?

This is the type of calculation where the G2 really shines.
Prime G1: ~15 sec
Prime G2: ~4 sec

I timed it as ~19 sec on my fx-CG50.

— Ian Abbott
Find all posts by this user
Quote this message in a reply
10-13-2019, 02:05 PM
Post: #10
RE: Plotting an integral
(10-13-2019 12:56 PM)ijabbott Wrote:  I timed it as ~19 sec on my fx-CG50.

That's faster than I expected. The ti nspire cx takes over a minute.
Find all posts by this user
Quote this message in a reply
10-13-2019, 05:18 PM
Post: #11
RE: Plotting an integral
The CASIO plots the function fairly quickly, but using the trace or graph analysis options would require quite a bit of time/patience...
Find all posts by this user
Quote this message in a reply
11-19-2019, 03:13 AM
Post: #12
RE: Plotting an integral
Note that we corrected this now to support, even if syntactically a bit wrong.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)