cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

assuming variable as integer

maggen
5-Regular Member

assuming variable as integer

i am working with fourier at the moment and when i assume n as integer is gives an error message, as seen in the photo linked

maggen_0-1583918299594.png

 

am i using this wrong or is it not able to apply to this. i know the answer is 2/(pi^2*n^2) but i would like to have mathcad solve it for me for other equations

 

1 ACCEPTED SOLUTION

Accepted Solutions
Werner_E
24-Ruby V
(To:maggen)

The "assume" modifier in Mathcads symbolic is quite weak and ever so often does not do what we expect.

 

But in your case it should work OK and actually it does for me. I tried with Prime 6 where PTC introduced a new symbolic engine and found that both, the old and the new engine, can successfully simplify your expression.

As you can see in the picture, the old engine needs to be told to simplify the result.

 

Its hard to debug just a picture so I can say what went wrong when you tried it. I would advice that you always attach your worksheet with your question and also state, which version of Prime you are using.
Did you try using a fresh worksheet without any definitions and calculations done above? Maybe something you assigned earlier (n?) is responsible for the error.

 

Here is the screenshot from Prime 6 using the new and also the old symbolic engine:

Werner_E_1-1583930077571.png

 

BTW, I would suggest to turn c.n into a function by typing c(n):=.... so you can use it in further calculations with variable values of n.

 

EDIT: I overlooked at first glance hat you wrote a boolean equal sign and not an assignment. But I just gave it a try and it still worked OK, so thats not the cause for the error.

View solution in original post

5 REPLIES 5
LucMeekes
23-Emerald III
(To:maggen)

The question is, I guess, what would you like Prime to do, other than assuming that n is a integer?

You are writing that cn is equal to this integral. Note! You are NOT assigning the integral to cn.

Essentially the task here is for Prime to decide whether your statement, that cn equals that integer, is either true or false...

 

Luc

Werner_E
24-Ruby V
(To:maggen)

The "assume" modifier in Mathcads symbolic is quite weak and ever so often does not do what we expect.

 

But in your case it should work OK and actually it does for me. I tried with Prime 6 where PTC introduced a new symbolic engine and found that both, the old and the new engine, can successfully simplify your expression.

As you can see in the picture, the old engine needs to be told to simplify the result.

 

Its hard to debug just a picture so I can say what went wrong when you tried it. I would advice that you always attach your worksheet with your question and also state, which version of Prime you are using.
Did you try using a fresh worksheet without any definitions and calculations done above? Maybe something you assigned earlier (n?) is responsible for the error.

 

Here is the screenshot from Prime 6 using the new and also the old symbolic engine:

Werner_E_1-1583930077571.png

 

BTW, I would suggest to turn c.n into a function by typing c(n):=.... so you can use it in further calculations with variable values of n.

 

EDIT: I overlooked at first glance hat you wrote a boolean equal sign and not an assignment. But I just gave it a try and it still worked OK, so thats not the cause for the error.

Here is an example of what I was talking about (turning c into a function of n):

Werner_E_0-1583931220968.png

 

ttokoro
20-Turquoise
(To:Werner_E)

7.png

LucMeekes
23-Emerald III
(To:maggen)

Other than that, Prime should be happy to accept an assignment like this:

LucMeekes_0-1583930037518.png

LucMeekes_1-1583930051219.png

LucMeekes_2-1583930084459.png

et cetera.

 

Success!
Luc

 

Top Tags