Homework 4
Experimental Math
Garrett Van Beek
April 4, 2020
Problem 1
Show that ParseError: KaTeX parse error: Got function '\underline' with no arguments as superscript at position 10: \Delta[x^\̲u̲n̲d̲e̲r̲l̲i̲n̲e̲{n}] = n * x ^\…
Problem 2
Create a sage function that given a function(symbolic expression) f, a non negative integer n∈Z≥ 0 and a number x, computes ∆^nf.Here ∆n means taking the operation n times. For example ∆^2(falling_factorial(x,3))(x) = ∆(3*falling_factorial(x,2))(x) = 6x^1= 6x.
Problem 3
Show that
Problem 4 (Bonus)
Give a convincing arguement for not going outside.
At this time, individuals should avoid group gatherings and going outside because they could not only contract the coronavirus, but they could also carry the virus (with or without symptoms). This means that they could introduce the virus to their friends and family that could be at risk.
Problem 5
Part 1
Part 2
Give a formula for
The summation can be represented by the formula: 2+2^(n+1)*(n-1) This is sequence A036799 on OEIS.
Part 3
What about
The summation is sequence A036800 on OEIS. It can be represented with the formula: -6+2**(n+1)(3 - 2n + n**2)
Problem 6
Give an equivalent to integration by parts for finite calculus. Use it to show
Problem 7
Check that
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-6-531f58828497> in <module>()
7 #H(1)
8 #limit((1-t^2)/(1-t), t=0)
----> 9 integral( (Integer(1)-t**Integer(2)) * BackslashOperator() * (Integer(1)-t), t, Integer(0)+epsilon, Integer(1)-epsilon )
/ext/sage/sage-8.9_1804/local/lib/python2.7/site-packages/sage/misc/misc.pyc in __mul__(self, right)
1171 (0.0, 0.5, 1.0, 1.5, 2.0)
1172 """
-> 1173 return self.left._backslash_(right)
1174
1175
/ext/sage/sage-8.9_1804/local/lib/python2.7/site-packages/sage/structure/element.pyx in sage.structure.element.Element.__getattr__ (build/cythonized/sage/structure/element.c:4606)()
487 AttributeError: 'LeftZeroSemigroup_with_category.element_class' object has no attribute 'blah_blah'
488 """
--> 489 return self.getattr_from_category(name)
490
491 cdef getattr_from_category(self, name):
/ext/sage/sage-8.9_1804/local/lib/python2.7/site-packages/sage/structure/element.pyx in sage.structure.element.Element.getattr_from_category (build/cythonized/sage/structure/element.c:4715)()
500 else:
501 cls = P._abstract_element_class
--> 502 return getattr_from_other_class(self, cls, name)
503
504 def __dir__(self):
/ext/sage/sage-8.9_1804/local/lib/python2.7/site-packages/sage/cpython/getattr.pyx in sage.cpython.getattr.getattr_from_other_class (build/cythonized/sage/cpython/getattr.c:2614)()
392 dummy_error_message.cls = type(self)
393 dummy_error_message.name = name
--> 394 raise AttributeError(dummy_error_message)
395 attribute = <object>attr
396 # Check for a descriptor (__get__ in Python)
AttributeError: 'sage.symbolic.expression.Expression' object has no attribute '_backslash_'
Problem 8:
Part 1
Give a recursive definition for the hamonic series to the power of k in sage.
Part 2
Represent the sequence as an integral.
We represent h(n,k) as summation from t=1 to t=n of 1/t**k
Part 3
Use sage to compute limit of H(n,2) as n goes to infinity.
h(n,2) converges to (1/6)*pi^2
Part 4
Show that the
Problem 9
In class we defined s(n,k) to be numbers such that:
ParseError: KaTeX parse error: Got function '\underline' with no arguments as superscript at position 4: x^\̲u̲n̲d̲e̲r̲l̲i̲n̲e̲{n} = \sum_{k=0… Give a formula for s(n,1) and s(n,2).
Note that s(n,k) represents the coefficient of x^k in the rising_factorial(x,n)
Give a formula for s(n,1)
This is the coefficient of x^1. Notice
s(n,1) = (n-1)!
Give a formula for s(n,2)
This is the coefficient of x^2. The formula is given by the sequence A000254 on OEIS.
s(n,2) = ( harmonic_number(i, 1) * factorial(i) ).numerator()
This was found by Eric Desbiaux, Jan 07 2009
Problem 10 (with bonus)
Create a sage code to plot the sequence s(n,k) after taking the residue when dividing by r. Use r different colors to plot the sequence.
My function supports r values from 1 to 10