Jump to content



Photo
- - - - -

Curious Question?


  • Please log in to reply
5 replies to this topic

#1 neontiger

neontiger

    Casio Fan

  • Members
  • PipPip
  • 32 posts
  • Gender:Male
  • Location:Buenos Aires, Argentina.

  • Calculators:
    FX-570MS
    FX-570ES
    ClassPad 300 Plus

Posted 01 June 2007 - 03:38 PM

Hi guys, I have a trouble. I was trying to perform this problem on the classpad:

Given:
				 
				 0<a<=1/4
				 
				 An =  n^(2n) * (2a)^n
					  -----------------
							 (2n)!
				 
				 ...determine whether this sequence in convergent. Determine what happens when a=1/4.
				 In the case this sequence is non-convergent, demonstrate it by using 2 subsequences whose limits are different to each other.



Then I typed in (in the ClassPad):

lim		n^(2n) * (2a)^n
					   -----------------
			 n->+inf		 (2n)!

But the classpad didn't give me any solution to this.The classpad just delayed almost a minute and then it returned the same expression without calculating limit. I think the problem is how does the CP to solve factorial expressions algebraically, that's to say, as everybody of us know, something like:

n!		n!						   1
			   ------ = ------- => simplify and then -------
			   (n+1)!	(n+1)n!					  (n+1)


What do you say about all this?

Another question:
Can I define my own factorial function in the classpad giving the following rules?


0! = 1
1! = 1
n! = n(n-1)!


Thanks in advance...

#2 The_AFX_Master

The_AFX_Master

    Casio Overlord

  • Admin
  • PipPipPipPipPipPipPip
  • 519 posts
  • Gender:Male
  • Location:Black Mesa Research Facility (sector C)
  • Interests:BASIC +FORTRAN 90+ C++.....and HALF LIFE

  • Calculators:
    Casio Algebra FX 2.0 Plus, Casio fx 570 ms, Classpad 300, And a crowbar

Posted 01 June 2007 - 04:51 PM

Another question:
Can I define my own factorial function in the classpad giving the following rules?


0! = 1
1! = 1
n! = n(n-1)!
Thanks in advance...


I think that you can't do such a decomposition on the classpad directly.. I have years without put my hands on Basic, so i don't know if tricking over it could be useful.

In CPLua you can do the job flawlessly via string manipulation. but my personal advice is, do these simplifications by hand.. the calculator isn't magic

#3 Gaumerie

Gaumerie

    Newbie

  • Members
  • Pip
  • 28 posts

Posted 03 June 2007 - 07:40 PM

You should use the Stirling's approximation :
n! ~ sqrt(2 pi n) (n/e)^n (n->+inf)

#4 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 04 June 2007 - 09:28 PM

Can I define my own factorial function in the classpad giving the following rules?
0! = 1
1! = 1
n! = n(n-1)!

You can't in CPBasic, because you need to define a recursive function for this, and CPBasic is not able to support even normal functions (they are limited to one command only). However, CPLua supports recursive functions, so you can do it easily.

#5 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 04 June 2007 - 10:44 PM

What about using the piecewise function?

piecewise(n=0,1,piecewise(n=1,1,n!))

#6 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 07 June 2007 - 10:59 PM

What about using the piecewise function?
piecewise(n=0,1,piecewise(n=1,1,n!))

Obviously a bad idea. You simply reinvent the wheel, because you define a factorial function which uses the built-in factorial.Totally useless. It is impossible to define a decent factorial function in CPBasic. In fact, it is not even possible to define any decent function in CPBasic (recursive or not). But even if you could, it will be very slow, compared to CPLua.

Strange, some people still use CPBasic...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users