Normal of Catmull-Rom Spline I've implemented Catmull-Rom in python and now I want to be able to get the normal of points so I'm first finding the tangent, to look something like this. For Catmull Rom I have 4 points P0, P1, P2 and P3. Using cfh's answer I've found the tangents of the two end points, P1 and P2

  #m1 represents tangent at starting point P1
  m1 = (t2-t1)*(((P1-P0)/(t1-t0))-((P2-P0)/(t2-t0))+((P2-P1)/(t2-t1)))
  #m2 epresents tangent at ending point P2
  m1 = (t2-t1)*(((P2-P1)/(t2-t1))-((P3-P1)/(t3-t1))+((P3-P2)/(t3-t2)))

I've then put these into the standard formula for a cubic spline following this post

cubic_spline = (2*t**3 - 3*t**2 + 1) * P1 + (t**3 - 2*t**2 + t) * m1 + (-2*t**3 + 3*t**2) * P2 + (t**3 - t**2) * m2
cubic_spline_deriv = (6*t**2 - 6*t)*P1 + (3*t**2 - 4*t + 1)*m1 + (-6*t**2 + 6*t)*P2 + (3*t**2 - 2*t)*m2

I think I'm massively misunderstanding the maths though.

I think that the output of cubic_spline_deriv is a tangent vector. However, when I try to plot it with plt.quiver I'm way off finding a tangent. I'd also expect cubic_spline to give the same output as C, but it doesn't.

Would it be at all possible for anyone to please take a look and see where I'm massively misunderstanding please?

My whole code is below:

    #https://stackoverflow.com/questions/34894837/how-to-get-connect-two-part-of-curve-and-get-the-points-position-of-connecting-c
##https://stackoverflow.com/questions/37214786/emulating-excels-scatter-with-smooth-curve-spline-function-in-matplotlib-for
def CatmullRomSpline(P0, P1, P2, P3, nPoints=100):
  """
  P0, P1, P2, and P3 should be (x,y) point pairs that define the Catmull-Rom spline.
  nPoints is the number of points to include in this curve segment.
  """
  # Convert the points to numpy so that we can do array multiplication
  P0, P1, P2, P3 = map(np.array, [P0, P1, P2, P3])

  # Calculate t0 to t4
  alpha = 0.5
  def tj(ti, Pi, Pj):
    xi, yi = Pi
    xj, yj = Pj
    return ( ( (xj-xi)**2 + (yj-yi)**2 )**0.5 )**alpha + ti

  t0 = 0
  t1 = tj(t0, P0, P1)
  t2 = tj(t1, P1, P2)
  t3 = tj(t2, P2, P3)

  # Only calculate points between P1 and P2
  t = np.linspace(t1,t2,nPoints)

  # Reshape so that we can multiply by the points P0 to P3
  # and get a point for each value of t.
  t = t.reshape(len(t),1)
  #print(t)
  A1 = (t1-t)/(t1-t0)*P0 + (t-t0)/(t1-t0)*P1
  A2 = (t2-t)/(t2-t1)*P1 + (t-t1)/(t2-t1)*P2
  A3 = (t3-t)/(t3-t2)*P2 + (t-t2)/(t3-t2)*P3
  #print(A1)
  #print(A2)
  #print(A3)
  B1 = (t2-t)/(t2-t0)*A1 + (t-t0)/(t2-t0)*A2
  B2 = (t3-t)/(t3-t1)*A2 + (t-t1)/(t3-t1)*A3

  C  = (t2-t)/(t2-t1)*B1 + (t-t1)/(t2-t1)*B2

  #m1 represents tangent at starting point P1
  m1 = (t2-t1)*(((P1-P0)/(t1-t0))-((P2-P0)/(t2-t0))+((P2-P1)/(t2-t1)))
  #m2 epresents tangent at ending point P2
  m2 = (t2-t1)*(((P2-P1)/(t2-t1))-((P3-P1)/(t3-t1))+((P3-P2)/(t3-t2)))

  cubic_spline = (2*t**3 - 3*t**2 + 1) * P1 + (t**3 - 2*t**2 + t) * m1 + (-2*t**3 + 3*t**2) * P2 + (t**3 - t**2) * m2
  cubic_spline_deriv = (6*t**2 - 6*t)*P1 + (3*t**2 - 4*t + 1)*m1 + (-6*t**2 + 6*t)*P2 + (3*t**2 - 2*t)*m2

  return C, cubic_spline, cubic_spline_deriv

def CatmullRomChain(P):
  """
  Calculate Catmull Rom for a chain of points and return the combined curve.
  """
  sz = len(P)

  # The curve C will contain an array of (x,y) points.
  #C is a list of x and y coordinates
  C = []
  Q = []
  Qd = []
  for i in range(sz-3):
    c, cubic_spline, cubic_spline_deriv = CatmullRomSpline(P[i], P[i+1], P[i+2], P[i+3])
    C.extend(c)
    Q.extend(cubic_spline)
    Qd.extend(cubic_spline_deriv)

  return C, Q, Qd

# Define a set of points for curve to go through
Points = [[0,1.5],[2,2],[3,1],[4,0.5],[5,1],[6,2],[7,3]]

# Calculate the Catmull-Rom splines through the points
c, q, qd = CatmullRomChain(Points)

u = qd[0][0]
v = qd[0][1]
print(c)
print(q)
print(len(qd))

# Convert the Catmull-Rom curve points into x and y arrays and plot
x,y = zip(*c)
plt.plot(x,y)

# Plot the control points
px, py = zip(*Points)
plt.plot(px,py,'or')
plt.quiver(2, 2, u, v)

plt.show()

Catmull Rom curve

if catmull-rom have v0 v1 v2 v3..

float t2 = t * t;

float m0 = (v2 - v0) * .5f;

float m1 = (v3 - v1) * .5f;

tangent   = (t2 - t) * 6f * v1 +
            (3f * t2 - 4f * t + 1f) * m0 +
            (-6f * t2 + 6f * t) * v2 +
            (3f * t2 - 2f * t) * m1;

if you want normalized >> tangent.normalized

if you want normal vector >> rotate right 90 degree

if tangent is Vector2, Very Simple >> normal = (tangent.y, -tangent.x)

Have a nice day!


$R_f \cong R[x]/(fx-1)$ Let $R$ be commutative ring with $1$. Let $f \in R$. Suppose $f$ is not nilpotent in $R$. We need to show $R_f \cong R[x]/(fx-1)$, with $D = \{f^n: n \ge 0\}$ and where $R_f = D^{-1}R$. I am given the following hint: [Show that the map $\phi : R[x] \to R_f$ gives a surjective ring homomorphism and the universal property in
  Theorem 36 gives an inverse.]

    Theorem 36: Let $R$ be a commutative ring with 1 and let $D$ be a multiplicatively closed subset of R containing 1. Then there is a commutative ring $D^{-1}R$ and a ring
    homomorphism $\pi: R \to D^{-1}R$ satisfying the following universal property: for any
    homomorphism $\psi : R \to S$ of commutative rings that sends 1 to 1 such that $\psi(d)$ is a
    unit in $S$ for every $d \in D$, there is a unique homomorphism $\Psi: D^{-1}R \to S$ such that $\Psi \circ\pi = \psi$.

I'm not sure where to go after I define $\phi$. How does the theorem give me an inverse, and how does that show that the two rings are isomorphic? Help would highly, highly be appreciated.

I personally find it easier to draw diagrams for something like Thm. 36, which states the following:

here $S$ can be any ring, for example $R[x]/I$ with $I = ⟨−1⟩$. To apply theorem 36 you need construct such a $\psi: R \rightarrow R[x]/I$, so that

  :→R[x]/I is a homomorphism of commutative rings that sends 1 to 1 such that () is a unit in R[x]/I for every ∈

as you already mentioned. You could probably construct $\psi$ through composition $\pi \circ i$ of following two homomorphisms: an embedding of $R$ in $R[x]$, $i: R \rightarrow R[x]$, $i(a) = a$ and a canocial projection of polynomials onto its equivalence classes wrt $I$, $\pi: R[x] \rightarrow R[x]/I$, $f \mapsto \overline{f} $.

The other homomorphism you apparently get by using a "standard" universal property of rings, which yields an isomorphism, if $\phi$ is surjective:

here you have $A = R[x]$, $B = R_f$ hence $\phi$, that you constructed should probably have $\ker(\phi) = ⟨−1⟩$.

TL;DR: Try to check if homomorphisms that you constructed have desired properties and if so, apply appropriate theorems

Here you take $S={\Bbb R}[x]/I$ with $I\langle fx-1\rangle$.
Then $f^n+I$ is a unit in $S$, since in $S$ we have $f\cdot x=1$ and so $f$ is invertible and so is each power of $f$. Now apply the universal property above and you will get the result!


How to prove that the $\gcd(n,m)=m$? I'm struggling with how to prove that the $\gcd(n,m)=m$?

It is given that $m$ is positive and $m|n$… But isn't that the proof already? If $m$ divides $n$ and $m$ divides itself (of course) then how can I formulate this properly?

Thanks!

Let $d$ be a natural number which divides $m$. Since $m\mid n$, it follows that $d\mid n$. Therefore$$\{\text{divisors of }m\}\subset\{\text{divisors of }n\},$$and so\begin{align}\{\text{common divisors of }m\text{ and }n\}&=\{\text{divisors of }m\}\cap\{\text{divisors of }n\}\\&=\{\text{divisors of }m\}.\end{align}Therefore,$$\gcd(m,n)=\text{greatest divisor of }m=m.$$

This is proper way to formulate this problem. $m \mid n$, thus there is an integer $k$ such that $n=mk$, then

$$\gcd(m, n)=\gcd(m, mk)=m \ \underbrace{\gcd(1, k)}_{=1}=m$$


What's the formula for the fixed point of a power tower of $2$s modulo $n$? e.g., $n = 3$. Clearly, the powers of $2$ modulo $3$ alternate $2, 1$. The powers of $4$ modulo $3$ are all $1$s. So a power tower of $2$s modulo $3$ must get stuck on $1$. Of course this method is inefficient, as $n = 5$ already shows. Is there a formula, or at least a more efficient method?

p.s. I tried Mathematica's FixedPoint function but got very confused on the syntax, like whether to do 2, # or #, 2.

Thinking about this as a fixed point is a bit misleading, since $k \mapsto 2^k$ is not a well defined function from $\mathbb{Z}/n \to \mathbb{Z}/n$. However, you are right that the sequence $2$, $2^2$, $2^{2^2}$, ... is eventually constant modulo $n$ for any $n$.

Proof by induction on $n$: Let $n = 2^k s$ for $s$ odd. By the Chinese remainder theorem, it is enough to prove that the sequence is eventually constant modulo $2^k$ and modulo $s$. The claim modulo $2^k$ is obvious -- the sequence is eventually zero. For $s$ odd, since $GCD(2,s) =1$, the value of $2^x$ modulo $s$ is determined by $x$ modulo $\phi(s)$. By induction, the sequence is eventually constant modulo $\phi(s)$, so it is also eventually constant modulo $s$ and we are done. $\square$.

Here is a straightforward Mathematica implementation.

oddPart[x_] := If[OddQ[x], x, oddPart[x/2]];
powerOfTwo[x_] := If[OddQ[x], 1, 2*powerOfTwo[x/2]];
eventualValue[1] = 0;
eventualValue[n_] :=
   With[{s = oddPart[n], t = powerOfTwo[n]},
     ChineseRemainder[{PowerMod[2, eventualValue[EulerPhi[s]], s] , 0}, {s, t}]];

The command PowerMod[a,b,m] computes $a^b \bmod m$ in a way which is faster and more memory efficient than Mod[a^b,m]. Other potential optimizations which I haven't implemented would be to memoize eventualValue, and to use bit shifting tricks to compute oddPart and powerOfTwo.

If $n$ is even, then there is no such value. For $n$ odd, you can use Carmichael's Function (wich would be equivalent to Euler's Totient for an odd $n$)


Volume formed by rotating square by 360 deg If I know the area of the square and I rotate it around one of the edges by $360$ deg, it forms a solid cylinder. Why then is the volume of this cylinder not equal to "area of the Square" multiplied by $360$? Or is it "area of the Square" multiplied by circumference multiplied by diameter?

Hints: Volume of the cylinder is the area of the (circular) base times the height.

As you rotate your square, what determines the area of the base; and what determines the height?

Imagine a cylinder with height $h$ and radius $r$. By definition, the formula for the volume of a cylinder is $$V= \pi r^2 h $$ Notice that the formula has nothing to do with "multiplying by $360^\circ$". The formula should make intuitive sense. The $\pi r^2$ that appears in $V$ is the cross-sectional area of the cylinder, so multiplying that quantity by $h$ will "stretch" that cross-section into the $3$-d volume we recognize as a cylinder.

Now imagine a square $S$ with base and height of length $s$. If you rotate $S$ by $360^\circ$ about one of its edges, then you will indeed generate a cylinder. Convince yourself that $h=s$ and $r=s$. Hence the volume of this cylinder must be $$V_S = \pi(s^2)s = \pi s^3$$


Does removing random items effect probability? Let us say you have a finite set of things (maybe playing cards?) called $S$. It has $n$ things. No let us say we want a thing from an arbitrary set $E$. First we remove $k$ number random things from S, were $0 \leq k<n$. Now I pick a random thing from $S$. Does the probability that the thing is in $E$ in terms of $E$, $k$, $n$ and $S$ actually depend upon $k$? If so, how?

Denote with $R$ the set that remains after removing $k$ elements from $S$. What the question boils down to is if the following equality holds:

$$\Pr(x \in E) = \Pr(x \in E \mid x \in R)$$

where the right-hand side is a conditional probability. This conditional probability can be calculated by the identity:

$$\Pr(x \in E \text{ and } x \in R) = \Pr(x \in E \mid x \in R) \Pr(x \in R)$$

Now because $R$ picks (uniformly) randomly from $S$, $x \in R$ is independent from $x \in E$, that is, $\Pr(x \in E \text{ and } x \in R) = \Pr(x \in E)\Pr(x \in R)$.

It finally follows that (using $\Pr(x \in R) > 0$):

$$\begin{align}
\Pr(x \in E \mid x \in R) &= \frac{Pr(x \in E \text{ and } x \in R)}{\Pr(x \in R)}\\
&= \frac{\Pr(x \in E)\Pr(x \in R)}{\Pr(x \in R)}\\
&= \Pr(x \in E)
\end{align}$$

which means that the probability that an $x \in R$ is in $E$ actually does not depend on $R$ whatsoever (as long as $R$ is not empty, i.e. $k < n$).

If you know what the things drawn from $E$ are, then yes, it affects the probability.  If you don't know what the things are, then it does not affect the probability.


Find the least value of $m+n$, where $1\le m<n$ such that the last three digits of $1978^n$ are the same as $1978^m$. I am no so sure how to do this without a calculator...
My method is like this.
So, $k=1978^n-1978^m$ is divisible by $1000$ which means $k$ is divisible by $8$ and $125$.
Since $8$ does not divide into $1978=2\times7\times 127$, $8$ divides $1978^m$ implies that $m\ge 3$.
Then obviously $125$ does not divide into $1978$ as well, so I need to figure out what $r$ is such that $1978^r\equiv 0\mod 125$. I have no idea how to find $r$ without using a calculator...
Could anyone help please?

If $n>m$ are such that $1978^n - 1978^m$ is a multiple of $1000$, then we factorize as $1978^{m}(1978^{n-m} - 1)$ is a multiple of $1000$.
This is equivalent to $1978^{m}(1978^{n-m}-1)$ being a multiple of $8$ and $125$.

In the first case, note that $1978^{n-m} - 1$ is odd because $n \neq m$, hence coprime to $8$. $1978$ as a multiple of $2$ has multiplicity $1$ . So it follows that $m \geq 3$ is necessary and sufficient for divisibility by $8$ to hold.

In the second case, $1978^m$ is coprime to $125$ (by prime factorization) so we need the smallest value of $T = n-m$ such that $1978^T \equiv 1 \pmod{125}$.
Note that $1978 \equiv 103 \pmod{125}$. So we need to find $T$ such that $103^T \equiv 1 \pmod{125}$. Now, since $\phi(125) = 100$ it follows that $T$ is a divisor of $100$.
Start with the basic : if $103^T \equiv 1 \pmod{125}$ then in particular $103^T \equiv 1 \pmod{5}$, which comes to $3^T \equiv 1 \pmod{5}$, which is true only if $T$ is even. Thus, all odd values of $T$ are ruled out.
Next, we go modulo $25$ to see that $3^T \equiv 1 \pmod{25}$ must be true. We see that $\phi(25) =20$, so $T$ must be a factor of $20$. It is easy (because $3$ is small) to see that no number smaller than $20$ works. Thus, $T=20$ or $T = 100$.
Unfortunately, checking that $103^{20} \not \equiv 1 \pmod{125}$ is to be checked by hand. One can use repeated squaring to make this easier. (Also refer to the answer linked by J.W.Tanner below).
Thus, $T=100$, and $n = 3+100 = 103$ and $m=3,n=103$ form the smallest set of values with $m+n = 106$.


The closure of an irreducible subset of an irreducible space is irreducible. Start with an irreducible space $X$. Take a subset $Y$ that is irreducible. Show that the closure of $Y$ is still irreducible.

I imagine we are supposed to start with saying, assume we have a decomposition for $\bar Y = S\cup T$ and then somehow derive a contradiction to $X$ or $Y$'s irreducibility, but I am struggling.

Suppose $\bar Y$ is not irreducible, so we have closed subsets $S,T$ in $X$ such that $\bar Y$ is not contained in either $S$ or $T$ but $\bar Y \subseteq S\cup T$. If $Y\subseteq S$, then $\bar Y\subseteq \bar S=S$, a contradiction, so $Y$ is not contained in $S$. Similarly $Y$ is not contained in $T$. But $Y\subseteq \bar Y\subseteq S\cup T$, thus $Y$ is not irreducible.

Consider $S^c$ and $T^c$, which are open in $\bar{Y}$. Then, since any nonempty open subset of an irreducible space ($Y$) is dense, we have, $\bar{S^c\bigcap Y}=Y$, and $\bar{T^c\bigcap Y}=Y$. Then, $Y=\bar{(S^c\bigcap Y})\bigcup(\bar{T^c\bigcap Y})$, which is a contradiction to Y being irreducible.


Test for a continuous function Let $f$ be a function defined in $[0, 6]$, continuous in $[0, 6]$
and it is provided of a third derivative in $]0, 6[.$ Which of the following assertions is false?
$$\fbox{A}\quad f \text{ has no asymptotes; }$$
$$\fbox{B}\quad f \text{ may have no critical points; }$$
$$\fbox{C}\quad f \text{ has a relative maximum or has a minimum
relative; }$$
$$\fbox{D}\quad f'' \text{ is continuous in } ]0; 6[;$$
$$\fbox{E}\quad \text{If } f'(5) = f''(5) = 0 \text{ and } f'''(5) = 7, \text{then } f \text{ has an inflection point with
a horizontal tangent at } x = 5$$
Below there is the original question in Italian Language. Above there is the translation.

My attempt of resolution for to find the correct answer. The $\fbox{A}$ is true being $f$ is continuous in $[0,6]$.  The $\fbox{B}$ is true for the Weierstrass' theorem: remark that $[0,6]$ is closed set. If I think to the polynomial $\deg(p(x))=6$ and $\fbox{C}$ for me it is true. For the $\fbox{D}$ I have thought that if $f$ and it is provided of a third derivative in $]0,6[$, almost for $f''$ is continuous in $]0,6[$. I'd say the $\fbox{E}$ is false, but I can't justify it.
I ask if my reasoning is correct or there are incongruities.

For me, C is false if you understand as a relative extremum (or local extremum) an extremum on a neighbourhood of a point in the interior of $[0,6]$. Indeed , here is a counterexample satisfying all the hypotheses, which has neither a local maximum nor a local minimum on $[0,6]$, albeit it has a maximum and a minimum:
$$f(x)=\frac 76(x-5)^3.$$
On the other hand, E is true, because if $f'''(5)=7$, it is positive in a small neighbourhood of $5$, say $I=(5-ε, 5+ε)$ (derivatives satisfy the  intermediate value property), so that $f''$ is increasing on this interval. Therefore , if $f''(5)=0$, we have $f''(x)<0$ on $(5-ε,5)$ and $f''(x)>0$ on $(5, 5+ε)$, so that $f'$ has a local  minimum on $I$, which corresponds to the definition of an inflection point.

Let's eliminate one by one.
A If $f$ is continuous in $[0,6]$ it means it is bounded for every $x \in [0,6]$. Therefore, no asymptotes. Thus, it's true.
B That is also true. For instance: $f(x) = e^x$. Remember that, in order to find critical points, we must take the first derivative and test for each $x$ that $f'=0$ or does not exist.
C That's also true. In order to find (local) maxima and minima we must consider both critical points and the bounds of the interval.
D Well, if $f'''$ is continuous in $]0,6[$ it means that $f''$ is differentiable in the same interval. Therefore, continuous as well.
E This is the false one. We may not ensure that the tangent will be horizontal. It would be correct if it said: ...$f'$ has a horizontal tangent at $x = 5$


Show that the series $\sum 3^n \sin(\frac{1}{4^n} x)$ converges absolutely and uniformly on $(a,\infty)$, where $a>0$. Show that the series $\sum 3^n \sin(\frac{1}{4^n} x)$ converges absolutely and uniformly on $(a,\infty)$, where $a>0$.

I am unable to determine how to apply the Weierstrass M-test here. Please show me how should I decide $M_n$ s.t. $|f_n(x)|\le M_n$.

$\sin x$ always less than $x$ for $x>0$
$\implies \sin(1/4^n x) < 1/4^n x$
$3^n \sin(1/4^nx) < (3/4)^n \cdot 1/x$
$\max{ (3/4)^n \cdot 1/x}  =  (3/4)^n \cdot 1/a$  which converges
Hence by Weierestrass theory the given series converges uniformly.

You serie is differentiable

$|f_n(x)|\leq \dfrac{3^n}{4^n}x$ so it converges pointwise absolutely
$f_n$ is differentiable for all $n$
$|f_n|=\dfrac{3^n}{4^n}|\cos\left(\dfrac{x}{4^n}\right)|\leq\dfrac{3^n}{4^n}\triangleq M_n'$

$$ f'(x)=\sum \dfrac{3^n}{4^n}\cos\left(\dfrac{x}{4^n}\right)$$

By the derivation under sum sign theorem $f'$ exists and to answer your question

$\sum f_n $is uniformaly convergent also.

Note : I made a detour by the derivated serie to seek uniform convergence for the initial serie.


Is there any solutions for this set of equation? Is there any solutions？ Why?How?
$$
\begin{array}{cccc}
3z &+ &4x + 3y &= 12\\
z &+ &4x + 3y &= 12\\
2z &+ &4x + 3y &= 12\\
\end{array}
$$

Whatever the values of $x$ and $y$, $3z=z=2z$ must hold, and $$z=0.$$ Then the system reduces to

$$4x+3y=12.$$

Yes!! There are many solutions to this set of equations
3z +4x +3y = 12z +4x +3y
=> 3z = 12z
=> z= 0
Now, since 12 2z + 4x+3y =12
=> 4x +3y =12  ( as z=0)
=> 4*0 + 3*4 =12 ie x=0,y=4 ,z=0
Or, 4*6/4 +3*2 =12 ie, x=3/2, y=2, z=0
Or, 4*0 + 3*4 = 12 ie, x=0, y= 4, z= 0
This way, x,y,z can hold infinite sets of values


Quadratic variation of independent processes when reading some lecture notes of stochastic calculus, I have notice that often the professor seems to use the fact that:
given $B^1$ and $B^2$ as two independent Brownian motion, then we have:
$$ \langle B^1, B^2 \rangle_t = 0$$
Is this true? Can anybody explain why?
TBN: angle brackets mean "quadratic variation of the processes".

The process $B = (B^1, B^2)$ is a 2-dimensional Brownian motion, hence a standard Wiener-process (on the natural filtration), so the Levy-theorem states that the covariation matrix is diagonal (we might need that they are continuous). I believe there should be an easier way though.
Edit: Looking back into my lecture, we showed once by direct calculation that the approximation of the quadratic covariation $ \tau_n ( \langle B^1 , B^2 \rangle )_t $ tends to 0 for a Riemann decomposition, which should also yield the claim.
I think another option would be to prove that $ B^1 B^2 $ is already a martingale (wrt some natural filtration), as the quadratic covariation is the only process in $ \mathcal{V} $ (the class of continuous processes starting in 0 and with bounded variation) s.t. $ B^1 B^2 - \langle B^1 , B^2 \rangle$ is a local martingale. I'm not sure, but this might also require continuity of $B^1$ and $B^2$ .
I hope this helps


The misuse of Dirac's $\delta$ In physics and engineering it is common practice to use the Dirac delta distribution to represent "densities" of discrete random variables. It is a very useful construct and you can do many things with it easily.

$$f_{\pmb x}(x)=\sum_{n=1}^{\infty}P(\pmb x = x_n) \,\delta(x-x_n) \;=\; \sum_{n=1}^{\infty}p_n \,\delta(x-x_n)$$

$$E_{f_{\pmb x}}\{\delta(g(\pmb x))\} \;=\; \sum_i \frac{f_{\pmb x}(x_i)}{{|g'(x_i)|}}\enspace, \quad \text{ with } g(x_i)=0 \text{ and } g'(x_i)\neq 0$$

$$\pmb y = g(\pmb x) \quad\Rightarrow \quad
  f_{\pmb y}(y) \;=\; E_{f_{\pmb y}}\{\delta(\pmb y - y)\} \;=\; E_{f _{\pmb x}}\{\delta(g(\pmb x)-y)\}$$

But the mathematicians always say it would be mathematically objectionable or even incorrect, because a density function made up of delta distributions is not continuous and not integrable. However the definition of the delta distribution precisely defines its integral. So what is the problem here?

Is there an example where the use of the Dirac delta function can lead do wrong results?

What the mathematicians are saying is not that the Dirac delta function is not continuous or integrable which requires first the object under discussion be an $\mathbf R\to\mathbf R$ function, but that it is not even an $\mathbf R\to\mathbf R$ function. However, the Dirac delta function is rigorously defined, only not as an $\mathbf R\to\mathbf R$ function but a class of linear functionals, which is a linear function from a function space into the set of real (complex) numbers $\mathbf R$,  called distribution or generalized function.

I am very happy to consider $\delta$ as a function, without having to mess with functional analysis that drives intuition away. Until I stumble upon the square $(\delta(x))^2$, which is a suspicious object: indeed, a single Internet search reveals trouble. $^{[1]}$

There is also another issue: if $\phi\colon \mathbb R^n\to \mathbb R$, I would be very happy to consider $\delta(\phi(x_1\ldots x_n))$. That's another case in which the $\delta$ "function" does not behave like a function at all.

Note [1]. At a more down-to-earth level, Note 2 in this answer shows that $\delta$ cannot be considered as an element of $L^2(\mathbb R)$, not even in a "weak" sense, so $\delta(x)^2$ should have an infinite integral, to begin with.


quadratic equation with imaginary part How can we  solve this equation

$x^2-bx-c=0$ where c is not real number.

I tried to solve the above equation but I am not sure if it is correct or not.

$x_{1,2}=\frac{b}{2}\pm \frac{\sqrt{b^2+4c}}{2}$

I do not know what is the next step to solve this problem when  c is not real number.

The method is exactly the same as if $c$ was real. Whatever $c$ is, just leave it, until you have your answer in the $x = \ldots$ format. At that point, you may expand/factor the expression as you see fit.

Note that $x_{1,2}$ will likely end up being complex solutions. So getting them on the cartesian form $x = a + bi$ might be handy if you need to use the solutions further on.

As for $\sqrt{b^2 + 4c}$, we have a complex in there (which I failed to address, pre-edit - sorry!), which means that the entire expression is complex. We may or may not find that the complex number has a zero imaginary part, in which case it's real, but we'll work with it as a complex number of the form $r + si$.

$$\sqrt{b^2 + 4c} = r+si$$

Square both sides, and expand RHS.

$$b^2 + 4c = r^2 - s^2 + 2rsi$$

With $c = p + qi$ being complex, we can rewrite LHS, and have:

$$b^2 + 4(p + qi) = r^2 - s^2 + 2rsi$$

$$b^2 + 4p + 4qi = r^2 - s^2 + 2rsi$$

Each side has a real part and an imaginary part. For the equality to hold, each of those must equal eachother. I.e.

$$b^2 + 4p = r^2 - s^2 \ \wedge 4qi = 2rsi$$

From there, you can rewrite the expression under the square root sign while taking into account that $c$ is complex.

Note; $p, q, r, s$ are all real.


Relation between cross-product and outer product If inner products ($V$) are generalisations of dot products ($ \mathbb{R}^n$), then are outer products ($V$) also related to cross-products ($ \mathbb{R}^3$) in some way?

A quick search reveals that they are, but yet the outer product of two column vectors in $ \mathbb{R}^3$ is a 3x3 matrix, not another column vector. What's the link? Thanks!

Cross product is much more related to exterior product which is in fact a far going generalization.

Outer product is a matricial description of tensor product of two vectors.

The inner product creates a scalar and the outer a skew-symmetric matrix. If you sum like-terms of this matrix you get a vector which also results from the cross product computation.


Show $\sum\limits_{n=0}^{\infty}\frac{1}{n(n+1)+x} = 2 \pi$ for some $x>0$ Prove that the series $\sum\limits_{n=0}^{\infty}\frac{1}{n(n+1)+x}$ for $x>0$ contains a value c such that $f(c)=2\pi$.

It seems like this is somehow related to the fact that
$$1-1/3+1/5-...=\pi/4$$
but I can't figure out how to manipulate the proof for that equation to align with this problem.

I know that I can use the Mean Value Theorem to show this since when $x$ approaches $0$, the sum is 1. I just need to show that a value for $x$ exists so that $f(x)>2\pi$.

Let $$f(x) = \sum_0^\infty \frac1{n(n+1)+x}$$.
Then for all $x>0$
$$
f(x) \leq \frac1x + \sum_1^\infty \frac1{n(n+1)+x}  \leq \frac1x + \sum_1^\infty \frac1{n(n+1)} $$

In particular,
$$
f(1) \leq 1+ \sum_1^\infty \frac1{n(n+1)} = 1+1 = 2 < 2\pi
$$
On the other hand,
$$f(\frac18) =8+ \sum_1^\infty \frac1{n(n+1)+\frac18} >8 > 2\pi
$$
then by the intermediate value theorem, ther is some $c$ in $[1,8]$ such that $f(c) = 2\pi$.

To be rigorous, you also actually need to prove that $f(x)$ is continuous, and that is somewhat harder.

A possible direct solution using Maple is as follows.

The series is computed as

$$f(x)=\frac{\displaystyle\pi\tan\left(\frac{\pi\sqrt{1-4x}}2\right)}{\sqrt{1-4x}}$$

Then we get the equation

$$\frac{\displaystyle\pi\tan\left(\frac{\pi\sqrt{1-4c}}2\right)}{\sqrt{1-4c}}=2\pi$$

and the corresponding solution is $$ c = 0.187500$$.

Do you agree?


How to integrate $\int_{-\infty}^{+\infty}\frac{1}{\sqrt{2\pi}}e^{iaz-z^{2}/2}dz$? I have tried to evaluate this integral, but failed to get a result. Wolfram alpha gives me $e^{-\frac{a^2}{2}}$ but I don't know how to get this result.

Note that after completing the square and enforcing the substitution $z\to z+ia$ yields

$$\begin{align}\frac1{\sqrt{2\pi}} \int_{-\infty}^\infty e^{iaz-z^2/2}\,dz&=\frac1{\sqrt{2\pi}} e^{-a^2/2}\int_{-\infty}^\infty e^{-\frac12(z-ia)^2}\,dz\\\\
&=\frac1{\sqrt{2\pi}} e^{-a^2/2}\int_{-\infty-ia}^{\infty-ia} e^{-\frac12 z^2}\,dz \tag 1\\\\
\end{align}$$

Now, from Cauchy's Integral Theorem , since $e^{-\frac12z^2}$ is analytic then

$$\oint_{C}e^{-\frac12 z^2}\,dz=0 \tag 2$$

for any rectifiable path $C$.

Let $R_1>0$ and $R_2>0$ and let $C$ in $(2)$ to be the closed path comprised of (i) the real segment from $-R_1-ia$ to $R_2-ia$; (ii) the line segment from $R_2-ia$ to $R_2$; (iii) the line segment from $R_2$ to $-R_1$; and (iv) the line segment from $-R_1$ to $-R_1-ia$.

Then, we have from $(2)$

$$\begin{align}
\int_{C}e^{-\frac12 z^2}\,dz&=\int_{-R_1-ia}^{R_2-ia}e^{-\frac12 z^2}\,dz+\int_{R_2-ia}^{R_2}e^{-\frac12 z^2}\,dz+\int_{R_2}^{-R1}e^{-\frac12 z^2}\,dz+\int_{-R_1}^{-R_1-ia}e^{-\frac12 z^2}\,dz \tag 3\\\\&=0
\end{align}$$

As $R_1\to \infty$ and $R_2\to \infty$, the second and fourth integrals on the right-hand side of $(3)$ tend to $0$, the first integral approaches the integral on the right-hand side of $(1)$, and the third integral approaches $\sqrt{2\pi}$.

Putting it all together, we obtain the coveted result

$$\frac1{\sqrt{2\pi}} \int_{-\infty}^\infty e^{iaz-z^2/2}\,dz=e^{-\frac12 a^2}$$


What is exactly the relation between vectors, matrices, and tensors? I am trying to understand what Tensors are (I have no physics or pure math background, and am starting with machine learning).

In an introduction to Tensors it is said that tensors are a generalization of scalars, vectors and matrices:

Scalars are 0-order tensors, vectors are 1-order tensors, and matrices are 2-order tensors. n-order tensors are simply an n-dimensional array of numbers.

However, this does not say anything about the algebraic or geometric properties of tensors, and it seems from reading around the internet that tensors are algebraically defined, rather than defined as an array of numbers.

Similarly, vectors are defined as elements of a set that satisfy the vector space axioms. I understand this definition of a vector space. And I understand that matrices are representations of linear transformations of vectors.

Question: I am trying to understand what a Tensor is more intuitively, and what the algebraic and intuitive/geometric relation is between tensors on the one hand, and vectors/matrices on the other. (taking into account that matrices are representations of linear transformations of vectors)

I will try to do things as concretely as possible by working in $\mathbb{R}^n$.

As you've mentioned, matrices represent linear maps. Tensors represent multi-linear maps.

Let's start with vectors. There are broadly speaking two "kinds" of vectors. We have column vectors, which are just the usual things we call vectors, and we also have row vectors. You may not see the point of distinguishing the two, but it is actually important. To distinguish the two, I will call column vectors simply as vectors whereas row vectors will be termed covectors. To distinguish the two, I will use boldface notation like $\mathbf{v}$ for vectors, with an added tilde $\mathbf{\tilde{v}}$ for covectors. To distinguish the spaces that they live in, I will say that vectors are elements of $\mathbb{R}^n$ whereas covectors are elements of $\mathbb{R}^{n*}$.

Suppose that we have a vector $\mathbf{v}$ and a covector $\mathbf{\tilde{u}}$. Then we may multiply the two get
$$\mathbf{\tilde{u}}\mathbf{v} = \begin{pmatrix}u_1 & \cdots & u_n\end{pmatrix}\begin{pmatrix}v_1 \\ \vdots \\ v_n\end{pmatrix}=u_1v_1 + \cdots + u_nv_n.$$ Notice that the result is just a scalar number (in fact, it is a dot product). Thus, $\mathbf{\tilde{u}}$ is naturally an object that takes a vector and returns a number. The object $\mathbf{\tilde{u}}$ is a linear map that maps vectors to numbers, i.e., $\mathbf{\tilde{u}}:\mathbb{R}^n \rightarrow \mathbb{R}$.

We can go one step further. In the above product, $\mathbf{\tilde{u}}$ naturally acts on $\mathbf{v}$ from the left to give a number. But we can also turn this around to say that $\mathbf{v}$ acts on $\mathbf{\tilde{u}}$ from the right to give a number. Thus we can also regard $\mathbf{v}$ as a map that takes covectors to numbers, i.e., $\mathbf{v}:\mathbb{R}^{n*}\rightarrow \mathbb{R}$. This restores the symmetry between the two.

The take away message so far is that vectors are objects that take covectors to numbers whereas covectors are objects that take vectors to numbers.

Now, what do matrices do? A matrix $A$ can be viewed in three distinct ways:

i) It takes a vector $\mathbf{v}$ to the vector $A\mathbf{v}$, i.e., $A:\mathbb{R}^n \rightarrow \mathbb{R}^n$.

ii) It takes the covector $\mathbf{\tilde{u}}$ to the covector $\mathbf{\tilde{u}}A$, i.e., $A:\mathbb{R}^{n*} \rightarrow \mathbb{R}^{n*}$

iii) Most importantly for our purposes however, is the fact that it takes a vector $\mathbf{v}$ and a covector $\mathbf{\tilde{u}}$ and gives back a number $\mathbf{\tilde{u}}A\mathbf{v}$. Thus we can view matrices as objects that take both a vector and a covector and gives back a number, i.e., $A:\mathbb{R}^{n*}\times \mathbb{R}^n \rightarrow \mathbb{R}$.

Notice that the first two properties can be seen as consequences of the last. If we give the matrix a vector, then we are still missing a covector in order to get a number. Thus when a matrix gets a vector, it becomes an object that maps covectors to numbers. These are precisely vectors as we've previously shown. Likewise, if we give the matrix a covector, then we still need a vector to get a number. Thus a matrix maps covectors to things that map vectors to numbers, i.e., covectors.

What we've shown is that the three ways of looking at matrices are equivalent. Symbolically, we can write
$$A:\mathbb{R}^n \rightarrow \mathbb{R}^n \cong A:\mathbb{R}^{n*} \rightarrow \mathbb{R}^{n*} \cong A:\mathbb{R}^{n*}\times \mathbb{R}^n \rightarrow \mathbb{R}.\tag{1}$$
A simple way to remember these equivalences is to remember that we can move $\mathbb{R}^{n}$/$\mathbb{R}^{n*}$ from the left of the arrow to the right of the arrow along with adding/removing the $*$.

So far this seems like a lot of pointless linear algebraic gymnastics, but in fact we are almost there. Matrices take $\mathrm{(covector,vector)}$ pairs to numbers, but there is another very natural object that does the exact same thing, namely the $\mathrm{(vector,covector)}$ pairs. Given a $\mathrm{(vector,covector)}$ pair $(\mathbf{v},\mathbf{\tilde{u}})$, we can have it act on a $\mathrm{(covector,vector)}$ pair $(\mathbf{\tilde{x}},\mathbf{y})$ as follows:
$$(\mathbf{v},\mathbf{\tilde{u}})(\mathbf{\tilde{x}},\mathbf{y}) = (\mathbf{\tilde{x}}\mathbf{v})(\mathbf{\tilde{u}}\mathbf{y}).$$
Notice that we are simply using the fact that the vector $\mathbf{v}$ takes the covector $\mathbf{\tilde{x}}$ to the number $\mathbf{\tilde{x}}\mathbf{v}$ while the covector $\mathbf{\tilde{u}}$ takes the vector $\mathbf{y}$ to the number $\mathbf{\tilde{u}}\mathbf{y}$.

The similarity between $\mathrm{(vector,covector)}$ pairs and matrices is more than skin-deep. Every matrix map can be expressed as a linear combination of these $\mathrm{(vector,covector)}$ pairs. In fact, it is rather trivial to do. For example a matrix $A$ with entries $A_{ij}$ can be written as
$$A = \sum_{i,j=1}^nA_{ij}\mathbf{e}_i\mathbf{\tilde{e}}_{j},$$
so the map $A:\mathbb{R}^{n*}\times \mathbb{R}^n \rightarrow \mathbb{R}$ can be equivalently represented as
$$A\cong \sum_{i,j=1}^n A_{ij}(\mathbf{e}_{i},\mathbf{\tilde{e}}_j).$$

In the present context, we typically don't use brackets $(\ ,\ )$ to denote $\mathrm{(vector,covector)}$ pairs. Instead, we use these neat little circles $\otimes$ instead:
$$(\mathbf{v},\mathbf{\tilde{u}}) := \mathbf{v}\otimes \mathbf{\tilde{u}}.$$

The pairs of vector/covectors are the objects that we call tensors. They live inside the tensor space $\mathbb{R}^n \otimes \mathbb{R}^{n*}$. Specifically, these are $(1,1)$ tensors, tensors comprised of a vector and a covector. What we've also shown is that
$$\mathbb{R}^{n,n} \cong \mathbb{R}^n \otimes \mathbb{R}^{n*},$$
that is, the vector space of $n\times n$ matrices $\mathbb{R}^{n,n}$ is isomorphic to the $(1,1)$ tensor space $\mathbb{R}^n \otimes \mathbb{R}^{n*}$.

The generalization is now clear. We can consider objects comprised of $r$ vectors and $s$ covectors:
$$\mathbf{v}_1 \otimes \cdots \otimes \mathbf {v}_r \otimes \mathbf{\tilde{u}}_1 \otimes \cdots\otimes \mathbf{\tilde{u}}_s.\tag{2}$$
These are $(r,s)$ tensors, multi-linear maps that take $r$ covectors and $s$ vectors, returning a number. In explicit, gory detail:
$$\begin{eqnarray}(\mathbf{v}_1 \otimes \cdots \otimes \mathbf{v}_r \otimes \mathbf{\tilde{u}}_1 \otimes \cdots \otimes \mathbf{\tilde{u}}_s)(\mathbf{\tilde{x}}_1,\cdots,\mathbf{\tilde{x}}_r,\mathbf{y}_1,\cdots,\mathbf{y}_s)\\
=(\mathbf{\tilde{x}}_1\mathbf{v}_1)\cdots(\mathbf{\tilde{x}}_r\mathbf{v}_r)(\mathbf{\tilde{u}}_1\mathbf{y}_1)\cdots(\mathbf{\tilde{u}}_s\mathbf{y}_s)\end{eqnarray}.$$

That's it. Tensors are nothing more than multi-linear maps
$$\underbrace{\mathbb{R}^{n*} \times \cdots \times \mathbb{R}^{n*}}_{r\ \text{copies}} \times \underbrace{\mathbb{R}^n \times \cdots \times \mathbb{R}^n}_{s\ \text{copies}} \rightarrow \mathbb{R}. \tag{3}$$
You can convince yourself that any multi-linear map of this kind can be written as a linear combination of primitive tensors of the form given in $(2)$, i.e., we have the vector space isomorphism
$$\underbrace{\mathbb{R}^n \otimes \cdots \otimes \mathbb{R}^n}_{r\ \text{copies}} \otimes \underbrace{\mathbb{R}^{n*} \otimes \cdots \otimes \mathbb{R}^{n*}}_{s\ \text{copies}} \cong \{\text{multi-linear maps of the form }(3)\}.$$

Of course in practice, tensors are very versatile. Using the same kind of reasoning that gave us equality $(1)$, we can move $\mathbb{R}^n$/$\mathbb{R}^{n*}$ from the left of the arrow to the right. Thus we can have identities of the form
$$\begin{eqnarray} \underbrace{\mathbb{R}^{n*} \times \cdots \times \mathbb{R}^{n*}}_{r\ \text{copies}} \times \underbrace{\mathbb{R}^n \times \cdots \times \mathbb{R}^n}_{s\ \text{copies}} \rightarrow \mathbb{R} \\
\cong \underbrace{\mathbb{R}^{n*} \times \cdots \times \mathbb{R}^{n*}}_{r-k\ \text{copies}} \times \underbrace{\mathbb{R}^n \times \cdots \times \mathbb{R}^n}_{s-\ell\ \text{copies}} \rightarrow \underbrace{\mathbb{R}^n \times \cdots \times \mathbb{R}^n}_{k\ \text{copies}}\times \underbrace{\mathbb{R}^{n*} \times \cdots \times \mathbb{R}^{n*}}_{\ell\ \text{copies}}.\end{eqnarray}$$
Thus we can equivalently regard $(r,s)$ tensors as multi-linear maps that take $r-k$ covectors and $s-\ell$ vectors, in turn giving us $k$ vectors and $\ell$ covectors. This is similar to the corresponding properties that matrices/$(1,1)$-tensors had.

Hopefully you can see now that tensors are a very versatile concept which directly generalize the concept of linear mappings. I shouldn't have to convince you of the utility that such objects have. Ideally, I would close with a practical example, but this answer is already uncomfortably long, so I'll stop here.

Vectors and Tensors are mathematical objects invariant under coordinate system chosen.
Matrices and Arrays for that matter are representations of rank-2 tensor or vectors in a given coordinate system.

As for the intuitive understanding part, take the analogy of a vector. By definition a vector is a magnitude and a direction. If I said  "5 miles an hour that a way" and point, that's a velocity vector. Until you put a coordinate system on it you can't write it down as an ordered pair. A tensor is the linear transformation that is invariant. Once you impose a coordinate system you can write it down as a matrix. That's why tensors are often used to describe material properties.


Show that the group is cyclic. I'm trying to show that the group $U(Z_{54})$ is cyclic.

To start, I found the divisors of 54 = {1, 2, 3, 6, 9, 18, 27, 54}

Then I started to find the elements using the powers of a.

Where $U(Z_{54})= <a>$

Therefore, $<a^{54/1}>$={ e }

$ <a^{54/2}>$= { e, $ a^{36}$ }

and such, where the last would be < $a^{54/54}$> = { e }

The things I would like to know is, how does this process show that it's cyclic?
Is it because the first divisor (1) and the last divisor (54) is equal to e? Therefore creating a cycle?

Also, what would the < a > to the powers finding the elements process be called?

Thank you!

Hint: (1). Suppose $s$ and $t$ are relatively prime. Then $U(st) \cong U(s) \oplus U(t).$ [ Notation: $U(n) := U(\mathbb{Z}_n)$ ].

(2). $|U(n)| = \phi (n),$ where $\phi$ is the Euler function.

(3). If $G$ and $H$ are two finite cyclic group of orders $m, n$ respectively, with gcd$(m, n) = 1$, then $G \oplus H$ is cyclic.

Note: For this particular case, may be it is easier to compute every element of $U(54)$ and to show that it is actually a cyclic group. But the above mentioned results will enable you to handle a wide range of problems of this kind.

A way to know that is by thinking the problem through number theory. The order of $U( \mathbb{Z}_{54})$ is $\phi(54) = \phi(2) \cdot \phi(3^{3}) = 3^{3} - 3^{2} = 18 = 2 \cdot 3^{2}$. As its order is of the form $2 p^{\alpha}$ then primitive roots exists and we are done.

Hope this helps!!


Are there any series whose convergence is unknown? Are there any infinite series about which we don't know whether it converges or not? Or are the convergence tests exhaustive, so that in the hands of a competent mathematician any series will eventually be shown to converge or diverge?
EDIT: People were kind enough to point out that without imposing restrictions on the terms it's trivial to find such "open problem" sequences. So, to clarify, what I had in mind were sequences whose terms are composed of "simple" functions, the kind you would find in an introductory calculus text: exponential, factorial, etc.

It is unknown whether
$$
\sum_{n=1}^\infty\frac{1}{n^3\sin^2n}
$$
converges or not. The difficulty here is that convergence depends on the term $n\sin n$ not being too small, which in turn depends on how well $\pi$ can be approximated by rational numbers. It is possible that, if $\pi$ can be approximated `too well' by rationals, then this will diverge. See this MathOverflow question for a discussion of this particular series.

Another even simpler example of a sequence (no summation) for which it is not known whether it converges or not is
$$
x_n=\frac{1}{n^2\sin n}.
$$
We would expect this to tend to zero, but the proof is beyond what is currently known. Suppose that there were only finitely many rational numbers $p/q$ with $\vert p/q-\pi\vert\le q^{-3+\epsilon}$ (for any $\epsilon > 0$), then $x_n$ would tend to zero at rate $O(n^{-\epsilon})$. If, on the other hand, there were infinitely many rationals satisfying $\vert p/q-\pi\vert\le q^{-3-\epsilon}$, then infinitely many $x_n$ would be of order at least $n^\epsilon$, so it diverges. This can be expressed in terms of the irrationality measure of $\pi$. The sequence $x_n$ converges to zero if the irrationality measure of $\pi$ is less than 3, and diverges if it is geater than 3. Currently, the best known bound for the irrationality measure is that it is no more than about $7.6063$* (see the link to the mathworld page above). It is expected that the irrationality measure of $\pi$ is 2 (it is known that all but a zero-measure set of real numbers have irrationality measure 2). Therefore, it is expected that $x_n$ tends to zero, but there is currently no proof of this.

[* The best known bound for the irrationality measure, as listed on the mathworld page, has been improved! It is now 7.10320533, according to the (not yet peer-reviewed) paper by Zeilberger and Zudlin, 2019. This is still much too small an improvement to say whether or not the sequence above converges.]

From Wikipedia:
The statement that the equation:
$$\frac{1}{\zeta(s)} = \sum_{n=1}^{\infty} \frac{\mu(n)}{n^s}$$
is valid for every $s$ with real part greater than 1/2, with the sum on the right hand side converging, is equivalent to the Riemann hypothesis.
This in turn can be rewritten as:
$$\displaystyle \frac{1}{\lim\limits_{k\to \infty } \, \left(\sum\limits_{a=1}^{k} \frac{1}{a^s}+\frac{1}{(s-1) k^{s-1}}\right)} =$$
$$\displaystyle \lim_{k \rightarrow \infty} \left( \underbrace{1 - \sum_{2 \leq a \leq k} \frac{1}{a^{s}} + \underset{ab \leq k}{\sum_{a \geq 2} \sum_{b \geq 2}} \frac{1}{(ab)^{s}} - \underset{abc \leq k}{\sum_{a \geq 2} \sum_{b \geq 2} \sum_{c \geq 2}} \frac{1}{(abc)^{s}} + \underset{abcd \leq k}{\sum_{a \geq 2} \sum_{b \geq 2} \sum_{c \geq 2} \sum_{d \geq 2}} \frac{1}{(abcd)^{s}} - \cdots}_{\text{number of alternating sums} > \frac{\log(k)}{\log(2)}} \right)$$
where:
$\Re(s)>0:\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\zeta(s)=\lim\limits_{k\to \infty } \, \left(\sum\limits_{n=1}^{k} \frac{1}{n^s}+\frac{1}{(s-1) k^{s-1}}\right)$


Modelling the number of apples an orchard yields with diminishing returns per tree This is Exercise 7.9  in the University of Washington's precal book.

Sylvia has an apple orchard.
One season, her 100 trees yielded 140 apples
per tree. She wants to increase her production
by adding more trees to the orchard. However,
she knows that for every 10 additional trees
she plants, she will lose 4 apples per tree (i.e.,
the yield per tree will decrease by 4 apples).
How many trees should she have in the orchard to maximize her production of apples?

Instructing a precal class, I walked through my approach to answering this in class (without preparing) and ended up doing something strange that may have confused the students. How would you clearly explain a way to get the function for the number of apples that we are trying to maximize? More generally, how would approach answering this question? It'd be nice to collect a some different approaches to demonstrate to my students that there is not a single rigid correct way to solve a problem.

Let $t=\text{the number of trees}$
Let $y=\text{the yield per tree}$
We know that when $t=100$, $y=140$. Furthermore, we know that for every $10$ additional trees, the yield decreases by $4$. I'm going to assume that this means that for every additional tree, the yield decreases by $0.4$ (obviously this is an average yield). If I increase the number of trees by $M$, then $t$ and $y$ change as follows:
\begin{align}
t&=100+M \\
y&=140-0.4M
\end{align}
We want the total yield to be as large as possible. This means that $ty$ has to be as large as possible:
\begin{align}
ty&=(100+M)(140-0.4M) \\
&=14000-40M+140M-0.4M^2 \\
&=-0.4M^2+100M+14000 \\
&=-0.4(M^2-250M-35000)
\end{align}
Completing the square on $M^2-250M-35000$, we have
\begin{align}
M^2-250M-35000&=(M-125)^2-125^2-35000\\
&=(M-125)^2-50,625
\end{align}
Hence,
\begin{align}
ty&=-0.4[(M-125)^2-50,625] \\
&=-0.4(M-125)^2+20,250
\end{align}
Since $-0.4(M-125)^2$ is always non-positive, the maximum yield is $20,250$, which occurs when $M=125$. Thus, the total number of trees in the orchard should be $225$.

The way I would explain this is by first recognizing that we are trying to maximize the number of apples. So we need an equation describing the total number of apples produced.
\begin{align}
Total\ Produced = \frac{apples}{tree}\times trees
\end{align}
The first term is the rate of production, for 100 trees $\frac{apples}{tree} = 140$ and $trees$ is the number of trees, i.e., 100.
Next, we need to get derive the equations for both of these terms as a function of the number of additional trees added. Let the letter $x$ denote how many additional trees are planted.

(remark) The question says that "for every 10 additional trees she plants, she will lose 4 apples per tree", does this mean that if $9$ additional trees are planted that the trees don't produce fewer apples. The question is from a precal book so I am assuming that each additional tree decreases the number of apples produced by $0.4 = \frac{4}{10}$. Otherwise, you will have to give a really confusing explanation like the number of additional trees will have the form $x=9+10y$ because the first 9 trees have no effect on yield per tree and then optimize for $y$.

For the rate of production, we see that
\begin{align}
\frac{apples}{tree} = 140 - \frac{4}{10}x
\end{align}
because "the yield per tree will decrease by 4 apples". The equation for the number of trees is,
\begin{align}
tress = 100 + x
\end{align}
because we started with $100$ and we are adding $x$ more.
Therefore, the total number of apples produced is $P(x) = (140-\frac{4}{10}x)(100+x)$.

(remark) I'm assuming that at this point they know about solving $\frac{dP}{dx}=0$ will give them a maximum. I would emphasize that setting $\frac{dP}{dx}=0$ gives a maximum and not a minimum because of sign of the $x^{2}$ term.

Differentiating $P$, $\frac{dP}{dx} = -\frac{8}{10}x + 100$, and setting it to zero to find the maximum we get that $x = \frac{1000}{8} = 125$.


Ring of rational functions for reducible variety Let $X$ be some affine algebraic variety over $\mathbb{k}$ (i.e. some closed subset in $\mathbb{A}_\mathbb{k}^n$). First suppose $X$ to be irreducible. Then the algebra $\mathbb{k}[X]$ is a domain and we can consider the field of rational functions $\mathrm{Quot}_{\mathbb{k}[X]}=\mathbb{k}(X)$. Could you explain me how to build an analogue of this field in the case when $X$ is not necessarily irreducible? Then $\mathbb{k}[X]$ must not be a domain and we are to build some kind of localization?
Also, what is the destination of rational functions? Why we cannot be satisfied with only regular maps and regular functions?

The analogue of the quotient field for a ring with zero divisors is the total ring of fractions: basically, just invert everything that is not a zero divisor. Geometrically, an element of this ring can be viewed as a collection of rational functions, one on each irreducible component of $X$, such that they coincide on intersections.

Rational functions are important for a wide variety of reasons. Asking this question is like asking why $\mathbf Q$ is important. Why weren't we happy with $\mathbf Z$? Well, it wasn't big enough for what we wanted to do, so we enlarged it.

This question may have general interest. There is an exercise in Matsumura (exercise 9.11 page 70) saying the following:
Let $A$ be a noetherian ring with the propery that $A_{\mathfrak{p}}$ is a domain for all prime ideals $\mathfrak{p}$. Let $\mathfrak{p}_1,..,\mathfrak{p}_l$ be the minimal prime ideals of $A$. It follows there is an isomorphism of rings
I1. $p:A \cong A/\mathfrak{p}_1\oplus \cdots \oplus A/\mathfrak{p}_l:=A_1\oplus \cdots \oplus A_l$
defined by
$p(a):=(\overline{a}, ..., \overline{a})$. This gives at the level of schemes an isomorphism
$Spec(A) \cong Spec(A_1) \cup \cdots \cup Spec(A_l)$
where the union is the "disjoint union".
This gives a general formula for the total ring of fractions $Tot(A)$:
I2. $Tot(A)\cong K(A/\mathfrak{p}_1)\oplus \cdots \oplus K(A/\mathfrak{p}_l)$
where $K(A/\mathfrak{p}_i)$ is the quotient field of the integral domain $A/\mathfrak{p}_i$.
Question: "Then k[X] must not be a domain and we are to build some kind of localization?"
Answer: The "total ring of fractions" is defined on page 21 in Matsumura's book "Commutative Ring Theory". This is a construction generalizing the "quotient field" defined for integral domains. If the ring $k[X]$ satisfies formula I1, it follows I2 gives a general formula for $Tot(k[X])$.
PS: I have not done the exercise myself.


How prove this two symmetric matrices $AB=0$ Let $A,B$ be real symmetric matrices, and for any $n\in \Bbb N^{+}$, and for all $x,y\in \Bbb R$, we have
$$tr(xA+yB)^n=x^ntr(A^n)+y^ntr(B^n).$$

Show that $AB=0$.

My try:since
$$(xA+yB)^n=x^nA^n+\binom{n}{1}x^{n-1}A^{n-1}yB+\cdots+\binom{n}{n-1}xA(yB)^{n-1}+y^nB^n$$
so
$$tr\left(x^nA^n+\binom{n}{1}x^{n-1}A^{n-1}yB+\cdots+\binom{n}{n-1}xA(yB)^{n-1}+y^nB^n\right)=x^ntr(A^n)+y^ntr(B^n)$$

then
$$tr\left(\binom{n}{1}x^{n-1}A^{n-1}yB+\cdots+\binom{n}{n-1}xA(yB)^{n-1}\right)=0$$
so
$$\binom{n}{1}x^{n-1}ytr(A^{n-1}B)+\cdots+\binom{n}{n-1}xy^{n-1}tr(AB^{n-1})=0$$
then I can't

I found this is a nice result, maybe this is an odd problem, and I can't solve it. Thank you.

This answer is an amalgamation of ideas from two deleted posts by @julien and @user1551 together with some of my thoughts.

Following @julien's insight, let us look at the polynomial condition at $n = 4$.
If one compare the coefficient of the $x^2 y^2$ terms on both sides, we get

$$2\text{tr}(A^2B^2) + \text{tr}( (AB)^2 ) = 0$$

Combine this with the fact

$$\text{tr}((AB+BA)^2) = \text{tr}((AB+BA)^T(AB+BA)) \ge 0 \\\implies \text{tr}(A^2B^2) + \text{tr}( (AB)^2 ) \ge 0$$

We get $\text{tr}(A^2B^2) \le 0$. However

$$\text{tr}(A^2B^2) = \text{tr}(ABBA) = \text{tr}((BA)^\top BA ) \ge 0$$

This implies $\text{tr}(A^2B^2) = 0$.

Following @user1551's idea. Since $A$ is real symmetric, we can choose a basis such that
$A$ is a diagonal matrix and its first $k=\text{rank}(A)$ diagonal entries are the only non-zero entries. $\text{tr}(A^2B^2)$ then become a positive linear combination of
the first $k$ diagonal entries of $B^2 = B^\top B$ which are non-negative themselves.

As a result, $\text{tr}(A^2 B^2) = 0$ implies the first k diagonal entries of $B^2$ vanish.
This means the first $k$ rows/columns of $B$ are zero and hence $AB=0$.

Update

It turns out there is a much simpler argument. The expression
$ \displaystyle \| C \|_F = \sqrt{ \text{tr}( C^\top C ) }$
is the famous Frobenius norm over the ring of real matrices! The vanishing of the coefficient of the $x^2 y^2$ terms
$$\text{tr}((AB+BA)^2) + 2\text{tr}(BAAB) = 0$$
is equivalent to
$$\quad  \|AB+BA\|_F^2 + 2\|AB\|_F^2 = 0$$
This implies $\|AB\|_F = 0$ and hence $AB = 0$.

$(xA+yB)^n=x^nA^n+\binom{n}{1}x^{n-1}A^{n-1}yB+\cdots+\binom{n}{n-1}xA(yB)^{n-1}+y^nB^n$

I don't understand, this is not true in general, but only if $AB=BA$ ! But this is not supposed, isn't it ?...

I know a more powerful result : it is enough in fact that the equality holds for $x=1$ and $y=1$ to ensure that $AB=0$. Therafter we have immediately $BA=0$ exchanging the role of $A$ and $B$.

And the converse is true, if $AB=0$ then $BA$=0 because of the symmetry (transpose) hence we have the equality of traces ... for all $x$ and $y$.


second order partial derivative notation What is the reason for a second-order derivative notation to be:

$\frac{d^2y} {dx^2}$

and not:

$\frac{d^2y} {d^2x}$ or $\frac{dy^2} {dx^2}$

Thanks in advance!

Suppose you want to take the derivative of
$\newcommand{d}{\mathrm d}f(x) = \left(e^x + \frac1x\right).$
You can write

$$ \frac\d{\d x} \left(e^x + \frac1x\right). $$

If you want the second derivative of $f(x)$, that's the derivative of the derivative:

$$ \frac\d{\d x} \left( \frac\d{\d x} \left(e^x + \frac1x\right)\right). $$

Now it's a notational convention that you can write $\d^2$ to combine the two $\d$ symbols in the "numerator" and $\d x^2$ to combine the two $\d x$ symbols in the "denominator".
But it's just a convention.

It might be a little clearer if we wrote $(\d x)^2$ instead of $\d x^2,$
but (again) it's just a notational convention anyway;
we are not really multiplying $\d x$ by $\d x.$

The first derivation to any equation Let it be (y) is as follows:

d\dx (y)

When we take the second derivative of the function (y) , We must hit the first differential at :

(d\dx) * ( d\dx (y) )

Finally, the second derivative becomes the following :

( d^2\dx^2 (y) )

( d^2(Y)\dx^2 )

I wish God success .


How to calculate the limit $\displaystyle\lim_{x \to 0} x\ln(x)$ by $\varepsilon-\delta$ definition? I know limit of $x \ln(x) $ at $ 0$ is $0$ (by writing this as  $\ln(x) / (1/x)$ then using L'hospital rule) but i want to prove this by $\epsilon-\delta$ definition. Can any one give some hint?

Best is to use the inequality $$\log t\leq t - 1,t\geq 1\tag {1}$$ Since $x\to 0^{+}$ we can assume $0<x<1$ so that $1/x>1$ and now we have $$\log x=-2\log(1/\sqrt{x})\geq - 2(x^{-1/2}-1)>-2x^{-1/2}$$ and thus we have $$|x\log x|<2\sqrt{x},0<x<1$$ Consider any $\epsilon >0$ and choose $\delta=\min(1,\epsilon ^2/4)$ then for $0<x<\delta$ we have $|x\log x|<\epsilon$ and thus $x\log x\to 0$ as $x\to 0^{+}$.

First formulate it in the given language. So, we want to find a $\delta$ such that $|x|<\delta$ implies $|x\ln(x)| < \varepsilon$. Now,

$|x\ln(x)|=|\ln(x^x)|<\varepsilon$

for example. These kinds of manipulatons and tricks (multiplying by 1 or adding 0 in a clever way) are what will get you there.

Note that some limits are very amenable to $\varepsilon-\delta$ proofs directly which is we have those nice tricks.


What is $\operatorname{max}(x)$ given that $ x \equiv n^p \pmod{q}$? Look at this:

$$ x \equiv n^p \pmod{q} $$

What is $\operatorname{max}(x)$?

It's somewhat meaningless to ask what is $\max(x)$ since if $n^p\equiv x\pmod{q}$, then $n^p\equiv (x+kq)\pmod{q}$ for all $k\in\mathbb{Z}$, so there's no upper limit.

Assuming that you are limiting $x$ to be in the range $[0,q-1)$, then the answer depends on $n,p$.  If $n$ is what's called a primitive root modulo $q$, then the powers of $n$ hit every element in $(0,q-1)$ in turn.  It's possible that $n^p\equiv q-1$, your worst nightmare.  Even if $n$ is not a primitive root modulo $q$, that doesn't really help much, as its powers are more or less evenly scattered among $(0,q-1)$, so the largest it gets is only slightly smaller than $q$.

If $q$ is a prime, then as $n$ ranges over $q$, this will define a finite field. Hence the maximum value it could be over $\mathbb{Z}/q\mathbb{Z}$ is $q-1$. However, this doesn't really help for a non-specific $n$.

Likely, if you are trying to calculate this in a program, the easiest way would be to directly calculate $n^{p} \ (mod \ q)$ utilizing exponentiation by squaring, and the fact that you only need to keep track of $q$ digits. This will give you a solution in $log \ p$ time. This may or may not be feasible depending on the exact size of $p$ and $q$.


Numeric solution of third order ODE I need to solve the following third order (non-linear) ODE by numerical methods:
\begin{equation}\tag{1}
h^{3} \dfrac{d^3 h}{d x^3} = h-1.
\end{equation}

By assumption, the solution should approach $ h=1$ when $ x\rightarrow -\infty $. Furthermore, if we linearize the equation above by introducing $ h_{0} = 1+\varepsilon(x) $, where $ \varepsilon(x)\ll 1 $, the equation reduces to $ \dfrac{d^3 \varepsilon}{d x^3} = \varepsilon,\, $ which has the solution $ \varepsilon(x) = A\exp(x)+\exp(-x/2) \left[ B\cos(\frac{\sqrt{3}}{2} x) + C\sin(\frac{\sqrt{3}}{2} x) \right] $.

This means that
\begin{equation}
h_{0}(x) = 1+A\exp(x)+\exp(-x/2) \left[ B\cos(\frac{\sqrt{3}}{2} x) + C\sin(\frac{\sqrt{3}}{2} x) \right]
\end{equation}
is a solution to the linearized problem. Now, to ensure that $ h_{0}(x) \rightarrow 1 $ for $ x\rightarrow -\infty $ we must require that $ B=C=0 $. Thus, our solution to the linearized problem simplifies to:
\begin{equation}
h_{0}(x) = 1+A\exp(x).
\end{equation}
Here is the actual problem:
Use this choice as an initial condition for solving eq. (1) numerically (preferably using Matlab) and show that
\begin{equation}
h''(x)\rightarrow K \quad\text{for}\quad x\rightarrow \infty
\end{equation}
and estimate the constant $ K $ (numerically).

Can anybody help? I'm not strong in numerical methods.

Hint:

This belongs to an ODE of the form http://eqworld.ipmnet.ru/en/solutions/ode/ode0503.pdf.

Let $y=\left(\dfrac{dh}{dx}\right)^2$ ,

Then $\dfrac{d^2y}{dh^2}=\pm2(h^{-2}-h^{-3})y^{-\frac{1}{2}}$

You can consider as two members Emden-Fowler type nonlinear ODE and follow the method in http://www.sciencepubco.com/index.php/ijamr/article/download/723/628


Find the number of positive integers solutions of the equation $3x+2y=37$ Find the number of positive integers solutions of the equation $3x+2y=37$ where $x>0,y>0,\ \ x,y\in \mathbb{Z}$  .

By trial and error I found

$$\begin{array}{|c|c|}  \hline
 x & y \\ \hline
11 & 2 \\ \hline
9 & 5  \\ \hline
7 & 8  \\ \hline
5 & 11  \\ \hline
3 & 14  \\ \hline
1 & 17  \\ \hline
\end{array}$$

Total  $\large 6$  pair of solutions.
But i would like to know if their is a specific method to only find the number of positive solutions and not necessarily the actual solutions.

I look for a short and simple way.
I have studied maths upto $12th$ grade.

In the world of combinatorics, you can use something commonly known as the "stars and bars" method. Generally put, the equation $$x_1+x_2+\ldots+ x_k = s$$ where $s,x_i$ are positive integers has $\binom{s-1}{k-1}$ many solutions. The quantity  $\binom{s-1}{k-1}$ is called a binomial coefficient. A general binomial coefficient $\binom{a}{b}$ where $a,b$ are nonnegative integers with $a \geq b$ is defined as $$\binom{a}{b} =\frac{a!}{b!(a-b)!}$$ which means $$ \binom{s-1}{k-1} = \frac{(s-1)!}{(k-1)!(s-k)!}$$ In your problem we have $s = 37$ and $k = 2$. So, we want to calculate $$\binom{37-1}{2-1} = \frac{36!}{1!\space 35!} = 36$$ However, this tells us that the equation $x+y = 37$ has $36$ solutions. Since your equation is $3x+2y = 37$, we'll want every third $x$ and every second $y$. This is tantamount to dividing $36$ by $3$ and $2$. We get $\frac{36}{3\cdot 2} = 6$, which matches your calculation. (Had the ratio not been an integer, you'd want to round down to the nearest integer). Depending on how large $k$ and $s$ are, you may find the stars and bars method to be preferable to calculating every solution by hand. It really boils down to a pretty easy factorial calculation. I'd say your problem could go either way.

Considering: 3x + 2y = 37
It will have: Floor(Floor(37/3)/2)=6 positive integer solutions
Consider: 2y = 37-3x
The max number of possible solutions is < Floor(37/3)=12
That is: {1, 2, 3, ..., 12} are the possible solutions
But: 37-3x (mod 2) = 0 (as 2 must divide 37-3x)

So generally: ax + 2y = c
Will have Floor(Floor(c/a)/2) positive integer solutions


What does "bounded away from zero" actually mean? For example, is $f(z) = 1/z$, on the set $0<z<1$ "bounded away from zero"?

If a set $S \subset \mathbb R$ is bounded away from zero, it means that there exists $m > 0$ such that $|x| > m$ for all $x \in S$.

If a function $f$ is bounded away from zero, it means that its range is bounded away from zero: there exists $m > 0$ such that $|f(x)| > m$ for all $x$.

Edited to clarify: When we say a set is bounded away from zero, we are not saying that away from zero, it is bounded. What would that even mean? We are saying that its distance from zero is bounded below by a strictly positive number. I see now that this is not self-evident, but that's what it means.

i emphasize, that bounded away from zero means correctly, that:

For all $\epsilon>0$: $f([\epsilon,1])$ is bounded


Length of a Parabolic Curve I just wanted to know how I can find the length of a curve given by $f(x) = x^2$ from $x=0$ to $x=1$.

For appproximation, the length is a bit larger than the hypotenuse of isosceles right triangle with the shorter side being 1 long.  It's definitely less than the sum of two shorter sides.  Thus, if we represent the length by $L$, the following relationship is expected:
$\sqrt 2 < L < 2$

I now regard $L$ as the accumulation of hypotenuses of infinitestimally small right triangles around $f(x)$.  Since $f'(x)=2x$, the general right triangle is something like this:
If $x$ goes very slightly down the $x$-axis ($\Delta x$), the the $y$ value goes upwards for $2x\Delta x$.

Thus the hypontenuse is the square root of the following:
$(\Delta x)^2+(2x\Delta x)^2$.
The hypotenuse is:
$(\Delta x) {( 4x^2 + 1)^{1/2}}$

Since $L$ has been defined as the accumulation of these hypotenuses, it is:
$L = \int_0^1 ( 4x^2 + 1)^{1/2} dx$.

I am stuck just here.  Could someone tell me if my chain of thoughts so far is right and how I can go from here?  I don't know how to calculate the integral of a function that contains another function in it.

Thanks!!

Your train of thought is exactly right; you've single-handedly rederived the formula for the length of a curve given by $y=f(x)$ :-) This can be written as

$$
L=\int_a^b\sqrt{1+f'(x)^2}\,\mathrm dx
$$

in general. In your case, as you rightly determined, $f'(x)=2x$, and we want the length from $a=0$ to $b=1$, so we have

$$
L=\int_0^1\sqrt{1+4x^2}\,\mathrm dx\;.
$$

To solve this integral, you can use the substitution $\sqrt{1+4x^2}=\cosh u$, so $x=\frac12\sinh u$ and $\mathrm dx=\frac12\cosh u\,\mathrm du$, to get

$$
L=\frac12\int_0^{\operatorname{arcosh}\sqrt5}\cosh^2 u\,\mathrm du=\frac14\left[x+\sinh x\cosh x\right]_0^{\operatorname{arcosh}\sqrt5}=\frac14\left(\operatorname{arcosh}\sqrt5+2\sqrt5\right)\approx1.479$$

If you don't know how to solve such an integral, you can always ask Wolfram|Alpha; it will usually know the answer and can often tell you the steps to get there if you click on "step-by-step solution"; though the solution will sometimes, as in this case, not be the most simple one.

You might also be interested in the question Intuition behind arc length formula.

height of parabola=1

base=1

hypotenuse length (check1) = 1.4142135623730950488016887242097

area between parabola and hypotenuse = $(1 \times 1)/6$

parabola length=$\sqrt(( 1\times1 + 1 \times 1 + 1 \times 1)/6) = 1.4719601443879744757940071211599.$


Constructing expressions Suppose you are given all the elementary symmetric functions of $n$ variables $x_1,x_2,...,x_n$ and two rational functions $A(x_1,x_2,...,x_n)$ and $B(x_1,x_2,...,x_n)$ in the same $n$ variables that are both preserved by the same group of permutations of the variables.

I'm looking for constructive proof or an algorithm that allows one to express $B$ with arithmetic operations given the elementary symmetric functions and $A$.

What I take from your question is that you want a constructive version of the theorem that says that if $K \subset L$ is Galois (here $L = k(x_i)$ and $K = k(\sigma_i)$) with Galois group $G$ (here, $S_n$), every intermediate field (such as $K[A]$) is of the form $L^H$ for some subgroup $H$ of $G$.

If you pick $H$ to be the subgroup fixing $A$, then $K[A]$ will obviously be equal to $L^H$ (it is included in $L^H$, and it can't be $L^{H'}$ for $H \subset H'$ because $A$ is not fixed by such a $H'$). And the surprise falling out of this theorem is that then any expression (such as $B$) that is invariant by $H$ can be expressed as an element of $K[A]$

There is an brute-force algorithm. You look at the sequence of $k$-vector spaces $k[\sigma_i,A]_d$ of polynomials of degree at most $d$ in $k[\sigma_i,A]$. Those are subspaces of $k[x_i]_d$, and you have a linear multiplication-by-$B$ map $k[x_i]_d \to k[x_i]_{d+e}$ where $e$ is the degree of $B$. Eventually, (by checking the respective dimensions of all those vector spaces), $k[\sigma_i,A]_d$ will be big enough inside $k[x_i]_d$ that you can find a nontrivial intersection between $B * k[\sigma_i,A]_d$ and $k[\sigma_i,A]_{d+e}$. Any nonzero element in that intersection correspond to a representation of $B$ as a rational function of the $\sigma_i$ and $A$. Just by computing the dimensions, you can find an upper bound on $d$. It is usually very very large and not the best possible though.

This is more detailed in this answer

Of course it is not a complete answer but good point to start.

Let $G$ be a group acting set $\Omega$ where $\Omega$ be set of all  elementary symmetric polynomials in n variables i.e. $\Omega=\{e_0,e_1...,e_n\}$.

And set formal sum $$R=\{\sum_{i=0}^nc_ie_i| c_i\in F   \}$$ Where $F$ is the field you used.

Then $R$ is a vevtor space over $F$ and you can expand action of $G$  from $\Omega$ to $R$ by defining $$g(\sum_{i=0}^nc_ie_i)=\sum_{i=0}^nc_ig(e_i)$$.

Then, Ever every $g$ correspond to a linear operotor or a $(n+1)(n+1)$ matrices and your functions $A$, $B$ a correspond to  vectors in $R$. Moreover, since $gA=A$ and $gB=B$ then $A$ and $B$ are eigenvectors of $g$ for every $g\in G$. Even if I can not see any direct relation between $A$ and $B$ linear algebra is good place to think this problem.


Finding the tangent line(s) to a curve in 3D parallel to a plane Given the curve $$r(t) = (1 − 2t)i + (t^2)j + (t^3/2)k, ~~ t > 0~.$$ Find a point on the curve at which the tangent line is parallel to the plane $$5x + y + z − 3 = 0~.$$

I have done everything including making the dot product of the normal of the plane and the direction of the tangent ($r'(t)$) equal to zero but it gives two values of $t$, are both values valid? How do I identify that?

By checking a necessary requirement for $t$, you've reduced the possible values of $t$ to a finite number of cases (two cases to be precise). The next step is now to check for every one of these values of $t$ whether the tangent at $r(t)$ is defined, and if so, indeed parallel to that plane.

The tangent vetor tothe curve is $\vec T= \frac{dx}{dt} \vec i+ \frac{dy}{dt} \vec j+ \frac{dz}{dt} \vec k$ the normal vector to the plane is $\vec N= 5\vec i+ \vec j +\vec k.$
The required points on the curve will be given by $\vec N. \vec T=0 \Rightarrow 3t^2+4t-20 =0$, so $t=2~\mbox{or}~ -10/3.$ So the required position vector of points are  obtained by putting these two values of $t$ in $\vec r=(1-2t) \vec i +t^2 \vec j+t^3/2 \vec k$ we get $\vec r_1=-3 \vec i+ 4 \vec j + 4\vec k$ and $\vec r_2=(23/3) \vec i+ (100/9) \vec j -(500/27,) \vec k$.


Proof of the limit of a sequence The sequence is:

$a_n$ = $\frac 1n$ [$(\frac 1n)^2 + (\frac 2n)^2 + (\frac 3n)^2...(\frac nn)^2$]

The objective is a proof of the limit from 1 to infinity. Just from toying around with a few examples, I speculate the limit is (1/3), but I'm not sure. This is how far I am into the proof (basically just the skeleton).

Let $\epsilon$ > 0. Choose N> _. Let n$\in \mathbb{N}$, n>N. We need |$\frac 1n$ [$(\frac 1n)^2 + (\frac 2n)^2 + (\frac 3n)^2...(\frac nn)^2$] - $\frac 13$| < $\epsilon$.

I don't really know how to manipulate this to get something useful. Any advice?


Infinite series question requiring no explanation Determine if the statement is true or false. No explanation needed.

$$\sum_{n=0}^{\infty}\frac{\sin n}{n!}\leq e$$

Although no explanation is needed I was wondering how you would approach this problem in the first place. Could I possibly use a comparison test of the infinite series? Would possibly a start would be,
$$\sum_{n=0}^{\infty}\frac{\sin n}{n!}\leq \sum_{n=1}^{\infty}\frac{(-1))^{n}}{n}$$ ?

We have $\sin x\le1$ so it follows: $$\sum_{n=0}^\infty\frac{\sin n}{n!}\le\sum_{n=0}^\infty\frac1{n!}$$
Given that we know $\sum_{n=0}^\infty\frac1{n!}=e$ we're done.

If you didn't know that, consider the Maclaurin series expansion of $e^x$ at $x=0$:
$$\begin{align*}e^x&=e^0+e^0x+\frac{e^0x^2}2+\frac{e^0x^3}{3!}+\dots\\&=1+x+\frac{x^2}2+\frac{x^3}{3!}+\dots\\&=\sum_{n=0}^\infty\frac{x^n}{n!}\end{align*}$$... since $\frac{d^n}{dx^n}e^x=e^x$. Now observe at $x=1$:
$$e^1=\sum_{n=0}^\infty\frac{1^n}{n!}\\e=\sum_{n=0}^\infty\frac1{n!}$$

It's very easy show that
$$\sum_{n=1}^{\infty}\dfrac{\sin{nx}}{n!}=e^{\cos{x}}\sin{(\sin{x})}$$
proof:
\begin{align}
\sum_{n=1}^{\infty}\dfrac{\sin{nx}}{n!}&=Im\left[\sum_{n=1}^{\infty}\dfrac{(e^{ix})^n}{n!}\right]\\
&=Im\left[\sum_{n=0}^{\infty}\dfrac{(e^{ix})^n}{n!}\right]=Im(e^{e^{ix}})\\
&=Im(e^{\cos{x}+i\sin{x}})\\
&=e^{\cos{x}}\sin{\sin{x}}
\end{align}
so
$$\sum_{n=1}^{\infty}\dfrac{\sin{n}}{n!}=e^{\cos{1}}\sin{\sin{1}}<e^{1}\cdot 1=e$$


Understanding the differential $dx$ when doing $u$-substitution I just finished taking my first year of calculus in college and I passed with an A.  I don't think, however, that I ever really understood the entire $\frac{dy}{dx}$ notation (so I just focused on using $u'$), and now that I'm going to be starting calculus 2 and learning newer integration techniques, I feel that understanding the differential in an integral is important.
Take this problem for an example:
$$ \int 2x (x^2+4)^{100}dx $$
So solving this...
$$u = x^2 + 4 \implies du = 2x dx \longleftarrow \text{why $dx$ here?}$$
And so now I'd have: $\displaystyle \int (u)^{100}du$ which is $\displaystyle \frac{u^{101}}{101} + C$ and then I'd just substitute back in my $u$.
I'm so confused by all of this.  I know how to do it from practice, but I don't understand what is really happening here.  What happens to the $du$ between rewriting the integral and taking the anti-derivative?  Why is writing the $dx$ so important?  How should I be viewing this in when seeing an integral?

Okay, so this is a slightly tricksy problem, because at first people think "Oh, it's fine, I just multiply through by this thing and it's fine" but then they think "Hang on, we've never actually defined what we meant by this... it's just some shorthand trickery" - but then if they eventually do differential geometry you think "Aha! So it did make sense all along!"

The main message I want you to take away is that things like $\mathrm d x$ are actually well defined things called differential forms which you don't really need to understand in any detail at all to get how they work.

The way they end up working in integration and changes of variable is roughly the following: they come together to make a volume form which just tells you how much volume a small range of your parameters corresponds to. (I say "come together" because if  you are doing many integrations like in $\int \int f(x,y) \;\mathrm d x \mathrm d y$ then you get a bunch of the $\mathrm d [...]$ things all together.) More precisely, remember how you can roughly define integration as a limit of a sum like
$$\int_a^b f(x) \mathrm d x \equiv \lim_{N\to\infty}\sum_{n=1}^N f(x_n) \left(x_n-x_{n-1}\right)$$
where $x_0=a,x_N=b$ and the other points $x_i$ are chosen in between, such that all gaps $\delta_n = x_n-x_{n-1} \to 0$ (say, uniformly) as $N\to \infty$.
Here, $\delta_n = x_n-x_{n-1}$ is providing some measure of how important the bit of space between $x_{n-1},x_n$ is in computing the integral. The $\mathrm d x$ is what keeps track of that information.

Suppose you then try $u=x^2$ or $x=\sqrt u$. Then in general
$$\int_{a^2}^{b^2} f(\sqrt u) \mathrm d u \equiv \lim_{N\to\infty}\sum_N f(\sqrt{u_n}) \left(u_n-u_{n-1}\right) = \lim_{N\to\infty}\sum_N f(x_n) \left(x_n^2-x_{n-1}^2\right)\neq \int f \mathrm d x$$
because the weight is different!

But notice that $x_n^2-x_{n-1}^2 = (x_n-x_{n-1})(x_n+x_{n-1}) \approx (x_n-x_{n-1})(2x_n)$ in the limit of fine spacing, so
$$\int_{a^2}^{b^2} f(\sqrt u) \frac{\mathrm d u}{2x} = \int_a^b f(x) \; \mathrm d x$$

We're really analyzing the difference between the volumes of the little patches of space when we play with the differentials. The trick is to realize that in general, just like here, $\mathrm d u = u'(x) \mathrm dx$. In higher dimensional integrals, you will discover that the generalization to e.g.
$$\int f(x,y) \;\mathrm d x\mathrm d y = \int f(u,v) \; J \; \mathrm d u\mathrm d v$$
where $u=u(x,y),v=v(x,y)$ involves a quantity $J$ called the Jacobian (determinant) which uses all the possible derivatives of $u,v$ with respect to $x,y$ in a particular way.

The notation
$$\frac{\mathrm d u}{\mathrm d x} = \lim_\text{fine spacing}\frac{\delta u}{\delta x} = \lim_{x_n-x_{n-1}\to 0}\frac{u_n-u_{n-1}}{x_n-x_{n-1}} = u'(x)$$
is now seen to be just a suggestive notation which works for the case of only one variable changing. It's used because it makes it clear how the volume form should be replaced.

When there are many variables, this notation breaks down because the factors are all mixed up together and people write partial derivatives, which you'll see soon if you haven't already, instead. It turns out that it makes sense to use a generalization of the
$$\mathrm d u = u'(x) \mathrm d x$$
law called the chain rule in which, for $u=u(x,y)$ for example
$$\mathrm d u = u_x \mathrm d x + u_y \mathrm d y$$
where $u_x(x,y)$ is the derivative of $u$ with respect to $x$ when we just think of $y$ as a constant.

You'll have to wait until differential geometry courses to see how to use this to get the Jacobian factor; it turns out that rather than just writing the forms together, you should technically define something called a wedge product such that $a\wedge b = -b\wedge a$ for one-forms like $\mathrm d x$; then you get
$$\mathrm d u \wedge \mathrm d v = (u_x \mathrm d x + u_y \mathrm d y)\wedge(v_x \mathrm d x + v_y \mathrm d y) = (u_x v_y-u_y v_x) \mathrm d x \wedge \mathrm d y$$
so that the Jacobian is (one over) $(u_x v_y-u_y v_x)=\det \pmatrix{u_x & u_y \\ v_x & v_y}$.

You can get this result directly from thinking about little patches of volume, however, so you'll see this far earlier than any differential form stuff. I just thought that, since you were curious, you should have had the full story mentioned to you along the way.

$dx$ is what is known as a differential. It is an infinitesimally small interval of $x$:

$$dx=\lim_{x\to{x_0}}x-x_0$$

Using this definition, it is clear from the definition of the derivative why $\frac{dy}{dx}$ is the derivative of $y$ with respect to $x$:

$$y'=f'(x)=\frac{dy}{dx}=\lim_{x\to{x_0}}\frac{f(x-x_0)-f(x_0)}{x-x_0}$$

When doing u-substitution, you are defining $u$ to be an expression dependent on $x$. $\frac{du}{dx}$ is a fraction like any other, so to get $du$ you must multiply both sides of the equation by $dx$:

$$u=x^2+4$$

$$\frac{du}{dx}=2x$$

$$dx\frac{du}{dx}=2x\space{dx}$$

$$du=2x\space{dx}$$


In a game of Bridge, what is the probability that all 4 players are dealt 13 cards of the same suit? I was asked this question by a student at my college, and I answered it like this:

Since Bridge is played with 4 players, and there are 4 suits per deck of 52 cards, and assuming the deck is a fair, properly shuffled deck of cards, then the probability of 1 player getting 13 of the same suit is $\dfrac {\left( \begin{matrix} 13\\ 13\end{matrix} \right) \left( \begin{matrix} 39\\ 0\end{matrix} \right) } {\left( \begin{matrix} 52\\ 13\end{matrix} \right) }\times4$ This simplifies down to $\dfrac {4} {( \begin{matrix} 52\\ 13\end{matrix} ) }$. But since the question is about the probability of all 4 players getting 13 cards of the same suit, then, since there are $4!$ ways of assigning suits to players, then, isn't the answer $\dfrac {4} {( \begin{matrix} 52\\ 13\end{matrix} ) }\times \dfrac {3} {( \begin{matrix} 39\\ 13\end{matrix} ) }\times \dfrac {2} {( \begin{matrix} 26\\ 13\end{matrix} ) }\times \dfrac {1} {( \begin{matrix} 13\\ 13\end{matrix} ) }$ ?

I would like to know if I answered correctly or if there's another way of looking at this.

Thanks!

There are $4!$ different ways to deal the cards so that each player gets all the cards of one suit. (This is the same number of ways to distribute 4 objects (suits) to the 4 players.)

The number of ways to deal out the cards is $\displaystyle{52\choose 13}{39\choose 13}{26\choose 13}{13\choose 13}$. You choose 13 cards to give to the first player, 13 to the second, etc.

Using the rule for probability, you get an answer of $\displaystyle\frac{4!}{{52\choose 13}{39\choose 13}{26\choose 13}{13\choose 13}}$, which is what you got.

The first card does not matter. The second card has to be one of the 39 of a different suit of the 51 still left. Then, one of the 26 of the 2 other suits of the 50 still left. finally, one of the 13 the 49 that at left.

Then the pattern is that with each card, the bottom number goes down by one and the top number is 12 for four time, 11 for four times, 10 for four times etc.

So the bottom number is 51!, that is "51 factoral."

The top number is 39 X 26 X 13 X (12 to the fourth) times (11 to the fourth) etc.

I do not have a calculator. Figure it out.


Should I put number combinations like 1111111 onto my lottery ticket? Suppose the winning combination consists of $7$ digits, each digit randomly ranging from $0$ to $9$. So the probability of $1111111$, $3141592$ and $8174249$ are the same. But $1111111$ seems (to me) far less likely to be the lucky number than $8174249$. Is my intuition simply wrong or is it correct in some sense?

You should never bet on that kind of sequence.
Now, every poster will agree that the odds of any sequence from 000000000 through 999999999 has an equal probability. And if the prize is the same for all winners, it's fine. But, for shared prizes, you will find that you just beat 10 million to 1 odds only to split the pot with dozens of people.
To be clear, the odds are the same, no argument. But people's bets will not be 100% random. They will bet your number as well as a pattern of 2's or other single digits. They will bet 1234567. I can't comment whether pi's digits are a common pattern, but the bottom line is to avoid obvious patterns for shared prizes.

When numbers run 1-50 or so, the chance of shared prizes increases when all numbers are below 31, as many people bet dates and stick to 1-31. Not every bettor does this of course, but enough so shared prizes show a skew due to this effect.

Again - odds are the same, but human nature skews the chance of split payout. I hope this answer is clear.

As mentioned by all other people here there is no disadvantage in picking 11111111 as your lottery number.
However I would just like to add that there is a pattern in these kinds of thinking mistakes.
Transitivity
Let's say that :

A = a very unlikely event
B = a very unlikely event

Our brain is tempted to use transitivity whenever it can.
Immediatly we want to know what happens if A and B would happen at the same time. Usually, the chance of A and B happening at the same time would then be even smaller. We would have to multiply the chances.
Cards, An example of transitivity
When taking a random card from a deck of cards (52 cards):

The chance to take an Ace = 1/13
The chance to take a Spade = 1/4
The chance to take the ace of spades = 1/13 * 1/4 = 1/52

Here it makes perfect sense.
The lottery problem , transitivity ?
It is tempting to apply this reasoning to the lottery problem.

A = the chance to guess the lottery number is very small
B = a number with all equal digits seems like something rare

And here again, our brain is tempted to use transitivity
The reasoning would then be that ...

the combined chance of (A and B) is smaller than the chance of A.

Unfortunately this is incorrect. You cannot apply transitivity here.
But why not ? I will illustrate with some more examples.
Dice problem , another transitivity failure
Here is an obvious example that makes the same mistake:

the chance to throw a 1 with a dice = 1/6
the chance to throw a 2 with a dice = 1/6
What is the chance to throw a 1 and a 2 at the same time with the same dice ? Is it 1/36 ?

It is of course impossible to throw a 1 and a 2 at the same time.
When can you apply transitivity ?
So, what is the difference between the dice and the cards?
The difference is that (as with the cards) when applying transitivity we have to make sure that the individual conditions that we are combining do not interfere with each other. If there are no such dependencies then you can blindly apply transitivity and multiply the individual chances.
Applying it !
There is 50% chance that I am a man, there is 50% chance that I am a woman. However, the chance that I am both is not just 25%. This is a perfect example of interfering conditions.
So, yes a digit with all equal numbers is something special (0.00001%), and yes guessing the lottery number is difficult (0.000001%). The problem is that you are trying to combine these 2 conditions, but the conditions are interfering.  So in conclusion, even while it seems that you should multiply the chances (0.0000001 * 0.00000001), this is in fact a mistake.
I hope this explanation gives you a better insight.


The diameter of a convex hull. I want to prove the following statement:

  Given $A\subset \mathbb{R}^n$ let $C(A)$ be its convex hull. Prove that $\text{diam }(A)=\text{diam }(C(A))$.

I can suppose that $A$ is a bounded closed set and I know that if $x,y\in A$ are such that $d(x,y)=\text{diam }(A)$ then $x,y\in \partial A$. I tried proving that if $z,w\in \partial C(A)$ then $d(z,w)\leq d(x,y)$ but it is a little difficult to me using the fact $C(A)$ is the convex hull.

Any hint?

Let $\ell = \mathrm{diam}\;A$.

Since $C(A) \supseteq A$, it is trivial to see $\mathrm{diam}\;C(A) \ge \ell$.

If $\mathrm{diam}\;C(A) > \ell$, then one can find $p, q \in C(A)$ such that
$d(p,q) > \ell$.

By Carathéodory's theorem, we can express $p$ as a convex linear combination of $P \le n+1$ points from $A$. More precisely, there exists
$$\begin{cases}
p_1, p_2, \ldots, p_P \in A\\
\lambda_1, \lambda_2, \ldots, \lambda_{P} \ge 0
\end{cases}
\quad\text{ with }\quad
\begin{cases}
\lambda_1 + \lambda_2 + \cdots + \lambda_P = 1\\
\lambda_1 p_1 + \lambda_2 p_2 + \cdots + \lambda_P p_P = p
\end{cases}
$$
Similarly, we can find $Q \le n + 1$ points in $A$ such that
$$
\begin{cases}
q_1, q_2, \ldots, q_Q \in A\\
\mu_1, \mu_2, \ldots, \mu_Q \ge 0
\end{cases}
\quad\text{ such that }\quad
\begin{cases}
\mu_1 + \mu_2 + \cdots + \mu_Q = 1\\
\mu_1 q_1 + \mu_2 q_2 + \cdots + \mu_Q q_Q = q
\end{cases}
$$
Notice as a function of $p$ and $q$, the distance $d(p,q) = |p-q|$ is a convex function in both of its arguments. This implies

$$d(p,q) = d\left(\sum_{i=1}^P \lambda_i p_i, \sum_{j=1}^Q \mu_j q_j \right)
\le \sum_{i=1}^P\sum_{j=1}^Q \lambda_i \mu_j d(p_i, q_j) \le \left(\sum_{i=1}^P\lambda_i\right)\left(\sum_{j=1}^Q \mu_j\right) \ell = \ell$$

Contradicts with our choice of $p, q$ which satisfy $d(p,q) > \ell$. This implies the underlying assumption $\mathrm{diam}\;C(A) > \ell$ is invalid. As a result, $\mathrm{diam}\;C(A) = \ell = \mathrm{diam}\;A$.

Note

If one adopt the definition that by convex hull, one mean the collection of all convex linear combinations of points from a set. We don't need Carathéodory's theorem at all. The argument above works as long as $P, Q$ exist and are finite.

Let $x,y\in C(A)$. Then by Carathéodory's theorem, there exists $p,q\le n+1$ and $x_1,\dots,x_{p},y_1,\dots,y_{q}\in A$ such that $x=\sum_{i=1}^{p}\lambda_{i}x_{i} $, $y=\sum_{j=1}^{q}\gamma_{j}y_{j}$, $\sum_{j=1}^{q}\gamma_{j}=1=\sum_{i=1}^{p}\lambda_{i}$ and $\lambda_{i}\ge0\ (i=1,\dots,p)$, $\gamma_{j}\ge0\ (j=1,\dots,q)$. Therefore
$$\|x-y\| = \left\|\sum_{i=1}^{p}\lambda_{i}x_{i}-y\right\|=\left\|\sum_{i=1}^{p}\lambda_{i}(x_{i}-y)\right\|\le\sum_{i=1}^{p}\lambda_{i}\|x_{i}-y\| \\ = \sum_{i=1}^{p}\lambda_{i}\left\|x_{i}-\sum_{j=1}^{q}\gamma_{j}y_{j}\right\| = \sum_{i=1}^{p}\lambda_{i}\left\|\sum_{j=1}^{q}\gamma_{j}(x_{i}-y_{j})\right\| \le \sum_{i=1}^{p}\lambda_{i}\sum_{j=1}^{q}\gamma_{j}‖x_{i}-y_{j}‖ \le \left(\sum_{i=1}^{p}\lambda_{i}\right)\left(\sum_{j=1}^{q}\gamma_{j}\right) \operatorname{diam}A = \operatorname{diam}A\text.\tag1\label1$$
Now by taking supremum over $x,y\in C(A)$, from \eqref{1} we obtain $\operatorname{diam}{C(A)}\le\operatorname{diam}A$. Since $A\subseteq C(A)$ we get $\operatorname{diam}{C(A)}\ge\operatorname{diam}A$. Consequently, $\operatorname{diam}{C(A)}=\operatorname{diam}A$.


Determinant of matrix with trigonometric functions Find the determinant of the following matrix:
  $$\begin{pmatrix}\cos\left(a_{1}-b_{1}\right) & \cos\left(a_{1}-b_{2}\right) & \cos\left(a_{1}-b_{3}\right)\\
\cos\left(a_{2}-b_{1}\right) & \cos\left(a_{2}-b_{2}\right) & \cos\left(a_{2}-b_{3}\right)\\
\cos\left(a_{3}-b_{1}\right) & \cos\left(a_{3}-b_{2}\right) & \cos\left(a_{3}-b_{3}\right)
\end{pmatrix}$$For $a_1,\dots ,a_3,b_1,\dots, b_3\in\mathbb{R}$

I'm completely stumped honestly. I tried using the cosine addition identity to open the cosine, but I wasn't able to find how it helps me, and even for a $2\times2$ version of the matrix I wasn't really sure what to do. Any help?

The matrix is the product
\begin{eqnarray}
\begin{pmatrix}\cos a_1& \sin a_1& 0\\ \cos a_2&\sin a_2& 0\\ \cos a_3&\sin a_3 &0\end{pmatrix}\begin{pmatrix}\cos b_1& \cos b_2&\cos b_3\\ \sin b_1&\sin b_2&\sin b_3\\ 0&0&0\end{pmatrix}
\end{eqnarray}
and thus the determinant is 0.

Find the determinant of the following trigonometric matrix(unit in radian):

sin1 sin2 sin3 sin4 sin5

sin2 sin3 sin4 sin5 sin6

sin3 sin4 sin5 sin6 sin7

sin4 sin5 sin6 sin7 sin8

sin5 sin6 sin7 sin8 sin9


Definite Integrals in General Form of Variation of Constants Formula An IVP of the form

\begin{align}
x'=p(t)x+q(t) \hspace{.25em}; \hspace{.5em}x(t_0)=x_0
\end{align}

has a general solution as follows

\begin{align}
\displaystyle x(t)=e^{\int_{t_0}^{t}p(\tau)d\tau}x_0+e^{\int_{t_0}^{t}p(\tau)d\tau}\int_{t_0}^te^{-\int_{t_0}^{s}p(\tau)d\tau}q(s)ds
\end{align}
I can easily reach this conclusion but only with indefinite integrals because the integration constant yields the first term after the equal sign; however, the above solution was presented to me and I am not sure where the definite integrals came from, any thoughts?

Let $f:A\rightarrow B$ be an integrable function, with the anti derivative being $F.$ Let $x_0\in A$ and $c\in B$.

You can write an indefinite integral say $$\int f(x) dx=F(x)+c$$ as something definite like $$\int_{x_0}^{x}f(\alpha)d\alpha=F(x)-F(x_0).$$ Now you could choose $c=-F(x_0)$. So they are essentially the same thing.

We can solve your problem using the integration factor $$e^{-\int_{t_0}^{t}p(\alpha) d\alpha}.$$

Since $p(x)$ and $q(x)$ are unknown the indefinite integrals can't be evaluated to some close form.  So general solution has to stay in integral form. The constant of integration is evaluated by initial condition and "re-combine" with the indefinite integral to form a definite integral. Definite integral is there to satisfy initial condition.

The general solution of the first order differential equation without applying its initial condition can be written as $$x(t)=c \cdot e^{A(t)} + e^{A(t)} \cdot B(t)$$ where $A(t)=\int p(t)dt$ and $B(t)=\int q(t) \cdot e^{-A(t)}dt$.  Lastly, $c$ is the integration constant to be determined by initial condition of differential equation.
Applying initial condition we have: $c={x_0} \cdot e^{-A(t_0)} - B(t_0) $.  Thus the general solution becomes $$x(t)=x_0 \cdot e^{A(t)-A(t_0)} + e^{A(t)} \cdot (B(t)-B(t_0)) .$$
Some of solution's terms can be written in definite integral form: $$x(t)=x_0 \cdot e^{\int _{t_0}^{t}p(\tau)d\tau} + e^{\int _{t_0}^{t}p(\tau)d\tau} \cdot e^{A(t_0)} \cdot \int _{t_0}^{t}q(\tau) e^{-\int p(\tau)d\tau} d\tau .$$
By moving constant $e^{A(t_0)}$ in the third integral we have
$$x(t)=x_0 \cdot e^{\int _{t_0}^{t}p(\tau)d\tau} + e^{\int _{t_0}^{t}p(\tau)d\tau} \cdot \int _{t_0}^{t}q(\tau) e^{A(t_0)-\int p(\tau)d\tau} d\tau .$$  Applying definition of definite integral to fourth integral, we get
$$x(t)=x_0 \cdot e^{\int _{t_0}^{t}p(\tau)d\tau} + e^{\int _{t_0}^{t}p(\tau)d\tau} \cdot \int _{t_0}^{t}q(\tau) e^{-\int _{t_0}^{\tau} p(s)ds} d\tau .$$   Q.E.D.


Is $(\Diamond p \rightarrow \Diamond q)\rightarrow \Diamond (p \rightarrow q)$ invalid in K? Is it true that the formula bellow is invalid in K:

$(\Diamond p \rightarrow \Diamond q)\rightarrow \Diamond (p \rightarrow q)$

Because we could construct a counter model where $(\Diamond p \rightarrow \Diamond q)$ is true by having $\Diamond p$ false that would make $(\Diamond p \rightarrow \Diamond q$) hold. Such a model would be for example a model with a single world with no successors with no valuation. Then in this model $\Diamond (p \rightarrow q)$ does not hold, because there does not exist a successor of x such that xRy and that in y $p \rightarrow q$ holds

Is this a correct counterexample?

Your counterexample is okay.

Indeed, it is not just a counterexample, it is the only counterexample.

Suppose $\lozenge p\to\lozenge q$ is assumed for some world.   Then it would follow:

in the case where $\lozenge p$, there $\lozenge q$ and therefore $\lozenge (p\to q)$.
in the case where $\lnot\lozenge p$, there $\square\lnot p$ and therefore $\square(p\to q)$. If there are any worlds accessible then $\lozenge (p\to q)$.

Therefore $(\lozenge p\to\lozenge q)\to\lozenge(p\to q)$ is true in any world that can access any worlds.

Thus wise, it is imperative that we explore those that cannot access possible worlds in our search for a counterexample.

So, as you suggested:

In the Accessible World Semantics, if there is a world which cannot access any possible world, then $\lozenge(p\to q), \lozenge p,$ and $\lozenge q$ are all false in that world, making $(\lozenge p\to\lozenge q)\to\lozenge(p\to q)$ false there too.

System K does not prohibit a Frame from having such a world, so $(\lozenge p\to\lozenge q)\to \lozenge(p\to q)$ is not a theorem of System K.

If you regard a model with just one possible world and your accesibility relation $R$ is reflexive ($wRw$ for all possible worlds), then your counter example works:

Say $\Diamond p$ false

$\Rightarrow$ $p$ false in $w$ (where $w$ is the only / static world) ..since $R$ is reflexive

$\Rightarrow$ $p \rightarrow q$ true in $w$

$\Rightarrow$ $\Diamond (p \rightarrow q)$ true in $w$ ..since $R$ is reflexive

$\Rightarrow$ $(\Diamond p \rightarrow \Diamond q) \rightarrow  \Diamond (p \rightarrow q)$ true in $w$ ..since $(\Diamond p \rightarrow \Diamond q)$ and $\Diamond (p \rightarrow q)$ are true in $w$


If $f’(x) = \sin x + (\sin4x)(\cos x)$, then $f’(2x^2 + \pi/2) $is? If $$f'(x) = \sin x + \sin4x \cdot \cos x,$$ then $$f'(2x^2 + \pi/2)$$ is?

Given answer: $$4x\cos(2x^2) – 4x\sin(8x^2) \sin(2x^2)$$

I tried and I'm getting the answer as $\cos(2x^2) - \sin(8x^2)\sin(2x^2)$

If $$f(x) = \sin x+\sin 4x\cdot \cos x\;,$$ Then put $$\displaystyle x = 2x^2+\frac{\pi}{2}$$

So $$\displaystyle f\left(2x^2+\frac{\pi}{2}\right) = \sin \left(2x^2+\frac{\pi}{2}\right)+\sin \left(8x^2+4\pi\right)\cdot \cos \left(2x^2+\frac{\pi}{2}\right)$$

So $$\displaystyle f\left(2x^2+\frac{\pi}{2}\right) = \cos 2x^2-\sin 4x^2\cdot \sin 2x^2$$

Above we have used $$\displaystyle \bullet\; \sin \left(\frac{\pi}{2}+\phi\right) = \cos \phi$$ and $$\displaystyle \bullet\; \cos \left(\frac{\pi}{2}+\phi\right) = -\sin \phi$$

and $$\displaystyle \bullet\; \sin (2\pi+\phi) = \sin \phi$$

@N Nair ...I was solving arihant today and came across the same problem (the reason I am here :p lol) and I think I have got a relevant answer to the question but have some doubts too.
 f'(2x^2+π/2) does not mean df(2x^2+π/2)/dx....(i)
It rather means ... df(2x^2+π/2)/d(2x^2+π/2) .....(ii)
so, case (i) which gives answer 4x{cos(2x^2)-sin(8x^2)sin(2x^2)} is WRONG and so I think the answer provided is WRONG.
and case (ii) will yield the answer cos(2x^2)-sin(8x^2)sin(2x^2) which according to me is CORRECT and thus YOUR ANSWER is CORRECT.
Any arguement to this? Please let me know :)


Is there any way to prove that $\sqrt {n-1} + \sqrt n + \sqrt {n+1}$ is irrational? Before this is marked as a duplicate I just want to say that I've already read a similar thread, where the original poster asked how they would prove that $\sqrt 2 + \sqrt 5 + \sqrt 7$ is an irrational number. I've read the answers to that thread and I couldn't really "apply"/use them in my situation.

Exercise added for reference. Post was edited because it was referring to a particular case (where n was assigned a value such as 6).
I'm trying to reopen the topic because I am more curious as to how you'd solve this type of exercise in the general form (like in the image).

If  $$r-\sqrt6=\sqrt5+\sqrt7,$$ where $r$ is a rational number, we obtain:
$$r^2+6-2r\sqrt6=12+2\sqrt{35},$$ which gives $$(r^2-6)^2=24r^2+8r\sqrt{210}+140$$ and since $r=0$ is impossible, we obtain a contradiction:
$$\sqrt{210}=\frac{r^4-36r^2-104}{8r}\in\mathbb Q.$$

Just muck.  Isolate radicals one by one to side; square and keep going to eliminate radicals one by one.
If $\sqrt 5 + \sqrt 6 + \sqrt 7 = r\in \mathbb Q$ then
$\sqrt 6 + \sqrt 7 = r- \sqrt 5$ then square both side
$6 + 7 + 2\sqrt{6*7} = r^2 - 2r \sqrt 5 + 5$.
$2\sqrt {6*7} + 2r \sqrt 5= r^2+5-6 -7$ then square both sides
$2^2*6*7 + 2^2r^2*5 + 2*2*2r\sqrt{5*6*7} = (r^2 + 5 -6-7)^2$
Thus $\sqrt {5*6*7} = \frac {(r^2 + 5 -6-7)^2-2^2*6*7-2^2r^2*5}{2*2*2r} \in \mathbb Q$.
And as $5*6*7$ is not a perfect square that is a contradiction.


Union of finitely many closed sets (a) Show that the union of finitely many closed sets is closed.
(b) Give an example showing that the union of infinitely many closed sets may
fail to be closed.

(a)
Given that $ \bigcup_{k=1}^{n} C_k $ is closed if $ \left[ \bigcup_{k=1}^{n} C_k \right]^c $ is open.
,and $ \left[ \bigcup_{k=1}^{n} C_k \right]^c $ is open if  $\bigcap_{k=1}^{n} C_{k}^c$ is open.
As It was shown previously that $\bigcap_{k=1}^{n} C_{k}^c$ is open (I did this in a previous post Intersection of open sets?),  $ \bigcup_{k=1}^{n} C_k $ has to be closed.
(b) any hint for this part?
Regarding (a) Is my argumentation sufficient? is there a better alternative?
Much appreciated.

Your proof of (a) is o.k.

(b): $ \bigcup_{k=1}^{\infty}[\frac{1}{k},1]$

The union of finitely many closed sets is open.
The intersection of an arbitrary collection of closed sets is closed.


Is there a relation between these definitions of vectors? I've come across two different definitions of vectors.
The first one is from linear algebra and it just defines vectors to be the elements of a vector space.
The other one is the one that we were taught in the physics class. There a vector was defined as anything whose coordinates transform in a particular way under certain transformations of space (the professor specifically gave example of the pairs of numbers $(x, y)\in\mathbb R^2$ and the transformation  on $\mathbb R^2$ as rotation by angle $\theta$ so that $(x, y)\mapsto (x\cos\theta+y\sin\theta, -x\sin\theta + y\cos\theta)$).
Question: Is there a relation between the two? And can someone help making the second definition mathematically precise, and more general? (I don't know how to generally define "space" in "transformations of space".)

To oversimplify, mathematicians love abstraction and physicists are practical: they want to calculate stuff.
You are being subjected to both viewpoints. Physics often uses $R^3$,  which satisfies the defining properties (axioms) of a vector space that were given in your math class. Thus, $R^3$ satisfies all the theorems about vector spaces that were proved there.
However, there is no harm in just understanding $R^n$ for now. It's much easier to understand the theory there.
BTW, the linear transformations from $R^3$ to itself (or the matrices that represent them) have a multiplication defined but, as a vector space, it's just $R^9$.


If $A$ and $B$ are linear transforms then show that My attempt:$$
 A(AB -BA) = (AB-BA )A\Leftrightarrow
2ABA = A(AB) +  (BA)A\Leftrightarrow
2ABA = AAB + BAA
$$
Now expanding the required to prove part for ($k= 2$)
$$
AAB- BAA = 2A(AB-BA )\Leftrightarrow
AAB - BAA = 2AAB - 2ABA\Leftrightarrow
2ABA - BAA = AAB
$$
now using 1. We get $\text{LHS}=\text{RHS}$

Now how to extend it further ?

You can use induction. For $k=1$, there's nothing to do. Now, let $k\in\mathbb N$ and suppose that $A^kB-BA^k=kA^{k-1}(AB-BA)$. Then\begin{align}A^{k+1}B-BA^{k+1}&=A^{k+1}B-A^kBA+A^kBA-BA^{k+1}\\&=A^k(AB-BA)+(A^kB-BA^k)A\\&=A^k(AB-BA)+kA^k(AB-BA)\\&=(k+1)A^k(AB-BA).\end{align}

As you proved k=2.  Now assume for k=n. And try to prove for k=n+1 by using (AB -BA)A= A(AB -BA) . Hence by principle of mathematical induction it holds for all k.