Jump to content



Photo
- - - - -

Prizm (Or 9860) Question - Plotting Or Integrating Using Max()?


  • Please log in to reply
2 replies to this topic

#1 spartybrutus

spartybrutus

    Newbie

  • Members
  • Pip
  • 6 posts
  • Gender:Male

  • Calculators:
    Casio fx-9860G Slim, CG-10, others from HP, TI

Posted 01 December 2014 - 04:59 PM

Hello,

 

Does anyone know of a method to plot (or integrate) the maximum of two expressions?   For example:

 

f(x) = max(sin(x), cos(x))?

 

It seems that the max() function is not allowed in graph or within other expressions:

 

Y1= Max({sin x, cos x})     ==> syntax error

 

and

 

integral(Max({sin x, cos x}),0,1)     ==> syntax error

 

This is a tricky function to plot and analyze.  Its doable on the TI84 and HP Prime.

 

Best,
Carl

 

 



#2 pan.gejt

pan.gejt

    Casio Freak

  • Members
  • PipPipPipPip
  • 262 posts
  • Gender:Male
  • Location:CZ

  • Calculators:
    .

Posted 03 December 2014 - 07:46 PM

The method is little bit tricky, because it uses Stat module. Following method works on my fx-9860g slim.

1. In Run-Mat module I generated and stored 4 sequences to Lists

  The syntax is Seq(expression,variable,start,end,increment)- I entered -4pi to 4pi with step 0.1pi

 

Seq(0.1x,x,-4pi,4pi,0.1pi)->List 1          this seq generate X coordinates

Seq(sin x,x,-4pi,4pi,0.1pi)->List 2         this seq generate value of sin x

Seq(cos x,x,-4pi,4pi,0.1pi)->List 3        this seq generate value of cos x

Max(List 2, List 3)->List 4                     this seq generate Y coordinates (max values from List 2 and List 3)

 

2. I switched to Stat module, all lists are now visible.

So, now press F6 (command Set) and enter following:

F1, which corresponds to StatGraph1 (or you can press F2 or F3 to get StatGraph2 or StatGraph3)

Graph type: F2 (xy)

XList: List 1

YList: List 4

Frequency: F1 (1)

Mark type: F3 (point), you can try the other 2 options

press exit for returning to previous screen

press F1 (GPH1) (or GPH2, GPH3- it depends on your selection)

now, you can see the graph.

-----------------------------------------------------------------------------------------------------------------------------------

 

The integral can be easily calculated in SpreadSheet module by using any numerical methods, e.g. trapezoidal rule.

I used the trapezoidal rule with h=0.02 ( n=50) and the result is 0.8739 (in Excel the result is 0.873938, in Mathcad Express Prime 3.0 the result is 0.873910, )

 

My technique:

A column - x values 0,0.02..1

B column - y values; max from D and E columns 

C column - summation of corresponding y values in C2 (=cellsum B2:B50) + computing the integral h/2×(b1+2×c2+b51); by corresponding values I mean corresponding to trapezoidal rule y1+y2+..+y49, because the y0 and y50 is not included to the summation 

D column - sin(x) values

E column - cos (x) values


Edited by pan.gejt, 04 December 2014 - 06:12 AM.


#3 spartybrutus

spartybrutus

    Newbie

  • Members
  • Pip
  • 6 posts
  • Gender:Male

  • Calculators:
    Casio fx-9860G Slim, CG-10, others from HP, TI

Posted 04 December 2014 - 08:18 PM

Thank you Pan for your quick and thorough answer.  Yes, it looks like there are workarounds for graphing or integrating an expression that is the maximum of two other expressions.

 

Unfortunately, I was hoping that the PRIZM was directly able to compute max(value 1, value 2 or f(x), g(x) etc) and not require lists as arguments.  I assume there is no catalog function that can do this?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users