Loading [MathJax]/jax/output/HTML-CSS/jax.js

First time here? Check out the FAQ!

Ask Your Question
1

Can sage help determine if |f(x)L|<ϵ is true?

asked 10 years ago

ensaba gravatar image

updated 10 years ago

slelievre gravatar image

Here's what I want to check:

Given f(x), ϵ>0, LR and N(ϵ), is n>N(ϵ)|f(n)L|<ϵ true?

I thought I could accomplish this using symbolic expressions and assume(). This is what I've tried:

forget()
var('ep, n')
f(x)=1/(n+7)
N = (1/ep)-7

assume(ep>0)
assume(n>N)

show(abs(f(n)-0)<ep)
bool(abs(f(n)-0)<ep)

But the result of is False. What is the proper way to do this in Sage?

Preview: (hide)

Comments

Edited: "< epsilon" instead of "< 3" in the displayed equation. Also, you want f(x) = 1 / (x + 7), not 1 / (n +7).

slelievre gravatar imageslelievre ( 10 years ago )

1 Answer

Sort by » oldest newest most voted
2

answered 10 years ago

slelievre gravatar image

Sage has some weaknesses when it comes to dealing with assumptions.

The best I can think of is the following:

sage: var('n eps')
sage: f(n) = 1 /(n + 7)
sage: assume('eps > 0')
sage: N = (1 / eps) - 7
sage: assume(n > N)
sage: sol = solve([abs(f(n)) < eps],n)
sage: sol
[[n < -7, -eps*n - 7*eps - 1 > 0],
 [n == -7, -1 > 0],
 [-7 < n, eps*n + 7*eps - 1 > 0]]

From there you can continue manipulating each of the "solutions".

Let's look at the second one. It's a bit disappointing that solve did not suppress it, given that -1 > 0 has no solution. But if you solve it again, you get an empty list, indicating "no solution" (beware that it might also mean "no solution found").

sage: a, b, c = sol
sage: b
[n == -7, -1 > 0]
sage: solve(b,n)
[]

For a, it's also disappointing that it doesn't get suppressed, since it's easy to derive that n > -7.

For c, it's also disappointing that it doesn't get simplified, since the second condition follows from the first, and could therefore be suppressed.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 10 years ago

Seen: 670 times

Last updated: Dec 13 '14