Evaluate an expression for given points
01-12-2020, 09:28 AM
Post: #1
 blevita Junior Member Posts: 29 Joined: Jun 2018
Evaluate an expression for given points
Hi there

I would like to evaluate the following expression for even and odd n‘s

One solution could be to type in n=1 then, n=2 and so on but this is time consuming. Is there a way to directly define the numbers where to evaluate the expression?

I have tried with n=[0 1] then the calculator crashed...

Thank you.
Regards
Blevita

Attached File(s) Thumbnail(s)

01-12-2020, 10:22 AM (This post was last modified: 01-12-2020 10:23 AM by Tyann.)
Post: #2
 Tyann Member Posts: 224 Joined: Oct 2014
RE: Evaluate an expression for given points
(01-12-2020 09:28 AM)blevita Wrote:  Hi there

I would like to evaluate the following expression for even and odd n‘s

One solution could be to type in n=1 then, n=2 and so on but this is time consuming. Is there a way to directly define the numbers where to evaluate the expression?

I have tried with n=[0 1] then the calculator crashed...

Thank you.
Regards
Blevita

Bonjour
Utilisez une liste {1,2,...} à la place de n.

Hello
Use a list {1,2,...} instead of n.

Sorry for my english
01-12-2020, 11:44 AM
Post: #3
 blevita Junior Member Posts: 29 Joined: Jun 2018
RE: Evaluate an expression for given points
Merci

Ca cest tres bien.

Worked perfectly
01-12-2020, 08:25 PM
Post: #4
 Allen Member Posts: 129 Joined: Aug 2014
RE: Evaluate an expression for given points
(01-12-2020 09:28 AM)blevita Wrote:  I would like to evaluate [an] expression for even and odd n‘s...

Is it practical to calculate f(x)=2/(n*pi) and multiply f(x) by (n MOD 2)?
This should return f(x) for odd n and 0 for even n.

it's possible to do the same thing if you don't have the MOD function by cleverly using (-1)^n.

17bii | 32s | 32sii | 41c | 41cv | 41cx | 42s | 48g | 48g+ | 48gx | 50g | 30b

01-13-2020, 02:28 AM
Post: #5
 CyberAngel Member Posts: 296 Joined: Jul 2018
RE: Evaluate an expression for given points
(01-12-2020 08:25 PM)Allen Wrote:
(01-12-2020 09:28 AM)blevita Wrote:  I would like to evaluate [an] expression for even and odd n‘s...

Is it practical to calculate f(x)=2/(n*pi) and multiply f(x) by (n MOD 2)?
This should return f(x) for odd n and 0 for even n.

it's possible to do the same thing if you don't have the MOD function by cleverly using (-1)^n.
irem
 « Next Oldest | Next Newest »

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