Perl Weekly Challenge 108: Bell Numbers

by Abigail

Challenge

Example

• $$B_0$$: 1 as you can only have one partition of zero element set.
• $$B_1$$: 1 as you can only have one partition of one element set $$\{a\}$$.
• $$B_2$$: 2
• $$\{a\}\{b\}$$
• $$\{a,b\}$$
• $$B_3$$: 5
• $$\{a\}\{b\}\{c\}$$
• $$\{a,b\}\{c\}$$
• $$\{a\}\{b,c\}$$
• $$\{a,c\}\{b\}$$
• $$\{a,b,c\}$$
• $$B_4$$: 15
• $$\{a\}\{b\}\{c\}\{d\}$$
• $$\{a,b,c,d\}$$
• $$\{a,b\}\{c,d\}$$
• $$\{a,c\}\{b,d\}$$
• $$\{a,d\}\{b,c\}$$
• $$\{a,b\}\{c\}\{d\}$$
• $$\{a,c\}\{b\}\{d\}$$
• $$\{a,d\}\{b\}\{c\}$$
• $$\{b,c\}\{a\}\{d\}$$
• $$\{b,d\}\{a\}\{c\}$$
• $$\{c,d\}\{a\}\{b\}$$
• $$\{a\}\{b,c,d\}$$
• $$\{b\}\{a,c,d\}$$
• $$\{c\}\{a,b,d\}$$
• $$\{d\}\{a,b,c\}$$

Discussion

The Bell Numbers have their own entry in the OEIS. We can look up the first ten Bell Numbers: $$1$$, $$1$$, $$2$$, $$5$$, $$15$$, $$52$$, $$203$$, $$877$$, $$4140$$, and $$21147$$.

Hello, World!

The simplest way would be just to take those ten numbers, and print them. This means we have yet again a challenge which is just a glorified Hello, World program.

Fetch

If we don't want to do exactly what the challenge asks from us (print the first ten Bell Numbers), we could instead fetch the numbers from the OEIS and print them. For instance, by using the OEIS module which we recently uploaded to CPAN.

There is limited usefulness in this though — it's not that the Bell Numbers will change in the future.

Calculate

Alternatively, we could calculate the first ten Bell Numbers. There are many ways to calculate the numbers, but we opt to create a Bell Triangle.

The first rows of the Bell Triangle are as follows:

 1
1  2
2  3  5
5  7 10 15
15 20 27 37 52

And we have the following rules to construct the triangle:

• The top row contains a single $$1$$.
• For each other row:
• The row will have one more element than the previous row.
• The first (left most) element is equal to the last (right most) element of the previous row.
• Each other element is the sum of the element to its left on the same row, and the element on the previous row right above that.

Or, formalized:

Let $$b_{r, c}$$ be the element on row $$r$$ and column $$c$$. (This implies $$0 \leq c \leq r$$, with the top most element being $$b_{0, 0}$$.) Then

$b_{r, c} = \begin{cases} 1, & \text{if } r = c = 0 \\ b_{r - 1, r - 1}, & \text{if } r > 0, c = 0 \\ b_{r, c - 1} + b_{r - 1, c - 1}, & \text{if } r \geq c > 0 \end{cases}$

If we then generate the first nine rows of the Bell Triangle, and take the last elements of each row, we get the second to tenth Bell Numbers. The first Bell Number is $$1$$.

Solutions

Depending on the language, we solve the challenge in one or more of the strategies explained above. All languages will implement the Hello, World! strategy. For some languages, we also calculate the Bell Triangle. And in Perl, we also implement a fetch strategy.

Languages which solve the problem in more than one way take a command line argument indicating the strategy to follow. This argument should be one of plain (the default), fetch (which fetches the numbers from the OEIS, or compute, which computes the first rows of the Bell Triangle.

We will only show the the plain solution for Perl; for the other implementations, see the GitHub links below.

Perl

plain

Can't be much simpler than this.

say "1, 1, 2, 5, 15, 52, 203, 877, 4140, 21147"

fetch

We're using the new module OEIS which export a single method, oeis, which takes two arguments: the sequence to fetch, and the number of elements to return.

use OEIS;
}

$, = ", "; say 1, map {$$_ [-1]} @bell;  Find the full program on GitHub. AWK The algorithm above is simply written down in AWK: BEGIN { COUNT = 10 bell [1, 1] = 1 for (x = 2; x < COUNT; x ++) { bell [x, 1] = bell [x - 1, x - 1] for (y = 2; y <= x; y ++) { bell [x, y] = bell [x, y - 1] + bell [x - 1, y - 1] } } printf "1" for (x = 1; x < COUNT; x ++) { printf ", %d", bell [x, x] } printf "\n" }  Find the full program on GitHub. Bash Bash doesn't have two dimensional arrays. So, we're using a function index which takes two arguments (an x and a y coordinate) and returns a single index. The return value is written in the global variable idx. We then get: set -f COUNT=10 function index () { local x=$1
local y=$2 idx=$((COUNT * x + y))
}

bell[0]=1
for ((x = 1; x < COUNT - 1; x ++))
do   index $x 0; i1=$idx
index $((x - 1))$((x - 1)); i2=$idx bell[$i1]=${bell[$i2]}
for ((y = 1; y <= x; y ++))
do  index   $x$y;       i1=$idx index$x       $((y - 1)); i2=$idx
index $((x - 1))$((y - 1)); i3=$idx bell[$i1]=$((bell[i2] + bell[i3])) done done printf "1" for ((x = 0; x < COUNT - 1; x ++)) do index$x $x; printf ", %d"${bell[\$idx]}
done
echo

Find the full program on GitHub.

C

C requires us to manage our own memory. Other than that, it's the same algorithm:

# define COUNT   10

typedef int number;  /* Change if we want large numbers */
char * fmt = "%d";   /* Should match typedef            */

int main (int argc, char * argv []) {
number ** bell;
if ((bell = (number **) malloc ((COUNT - 1) * sizeof (number *)))
== NULL) {
perror ("Mallocing bell failed");
exit (1);
}
if ((bell [0] = (number *) malloc (sizeof (number))) == NULL) {
perror ("Mallocing row failed");
exit (1);
}
bell [0] [0] = 1;
for (int x = 1; x < COUNT - 1; x ++) {
if ((bell [x] = (number *) malloc ((x + 1) * sizeof (number)))
== NULL) {
perror ("Mallocing row failed");
exit (1);
}
bell [x] [0] = bell [x - 1] [x - 1];
for (int y = 1; y <= x; y ++) {
bell [x] [y] = bell [x] [y - 1] + bell [x - 1] [y - 1];
}
}

/*
* Print the right diagonal
*/
printf (fmt, 1);
for (int x = 0; x < COUNT - 1; x ++) {
printf (", ");
printf (fmt, bell [x] [x]);
}
printf ("\n");
exit (0);
}

Find the full program on GitHub.

Lua

Same algorithm:

local COUNT = 10
local bell  = {}

bell [0] = {}
bell [0] [0] = 1
for x = 1, COUNT - 2
do  bell [x] = {}
bell [x] [0] = bell [x - 1] [x - 1]
for  y = 1, x
do   bell [x] [y] = bell [x] [y - 1] + bell [x - 1] [y - 1]
end
end

io . write (1)
for x = 0, COUNT - 2
do  io . write (", " .. bell [x] [x])
end
io . write ("\n")

Find the full program on GitHub.

Node.js

let COUNT = 10
let bell  = [[ 1 ]]
let x
for (x = 1; x < COUNT - 1; x ++) {
bell [x] = [bell [x - 1] [x - 1]]
let y
for (y = 1; y <= x; y ++) {
bell [x] [y] = bell [x] [y - 1] + bell [x - 1] [y - 1]
}
}

process . stdout . write ("1")
for (x = 0; x < COUNT - 1; x ++) {
process . stdout . write (", " + bell [x] [x] . toString ())
}
process . stdout . write ("\n")

Find the full program on GitHub.

Python

Python doesn't autovivify array elements when indexing out of bounds. So we use the append method to add elements to arrays.

COUNT = 10
bell  = [[1]]
for x in range (1, COUNT - 1):
bell . append ([bell [x - 1] [x - 1]])
for y in range (1, x + 1):
bell [x] . append (bell [x] [y - 1] + bell [x - 1] [y - 1])

print (1, end = '')
for x in range (0, COUNT - 1):
print (",", bell [x] [x], end = '')

print ("")

Find the full program on GitHub.

Ruby

COUNT = 10
bell  = [[1]]
for  x in 1 .. COUNT - 2
bell [x] = [bell [x - 1] [x - 1]]
for  y in 1 .. x
bell [x] [y] = bell [x] [y - 1] + bell [x - 1] [y - 1]
end
end
print (1)
for  x in 0 .. COUNT - 2
print (", ")
print (bell [x] [x])
end
puts ("")

Find the full program on GitHub.

Other languages

We also have simple solutions for BASIC, bc, Befunge-93, Cobol, Csh, Erlang, Forth, Fortran, Go, Java, m4, OCaml, Pascal, PHP, PostScript, R, Rexx, Scheme, sed, SQL, and Tcl.


# Toronto Math Forum

## MAT244-2013S => MAT244 Math--Tests => MidTerm => Topic started by: Victor Ivrii on March 06, 2013, 09:08:26 PM

Title: MT Problem 3
Post by: Victor Ivrii on March 06, 2013, 09:08:26 PM
Find a particular solution of equation
\begin{equation*}
t^2 y''-2t y' +2y=t^3 e^t.
\end{equation*}

[BONUS] Explain whether the method of undetermined  coefficients to find a particular solution of this equation applies.
Title: Re: MT Problem 3
Post by: Jeong Yeon Yook on March 06, 2013, 10:30:47 PM
The method of undetermined coefficient applies because it only "requires us to make an initial assumption about the form of the particular solution, but with the coefficients left unspecified" (Textbook 10th Edition P.177).

If t = 0, we have, 2y = 0. => y = 0 is the solution for t = 0.
Title: Re: MT Problem 3
Post by: Rudolf-Harri Oberg on March 06, 2013, 10:50:34 PM
This is an Euler equation, see book page 166, problem 34. We need to use substitution $x=\ln t$, this will make into a ODE with constant coefficients. We look first at the homogenous version:
$$y''-3y'+2y=0$$

Solving $r^2-3r+2=0$ yields $r_1=2, r_2=1$. So, solutions to the homogeneous version are $y_1(x)=e^{2x}, y_2(x)=e^{x}$. But then solutions to the homogeneous of the original problem are $y_1(t)=t^2, y_2(t)=t$.
So, $Y_{gen.hom}=c_1t^2+c_2t$. We now use method of variation of parameters, i.e let $c_1,c_2$ be functions.
To use the formulas on page 189, we need to divide the whole equation by $t^2$ so that the leading coefficient would be one, so now $g=t e^t$. The formula is:
$c_i'=\frac{W_i g}{W}$, where $W_i$ is the wronksian of the two solutions where the i-th column has been replaced by $(0,1)$.
We now just calculate that $W(t^2,t)=-t^2, W_1=-t, W_2=t^2$. Now we need to compute $c_1, c_2$.

$$c_1'=e^t \implies c_1=e^t$$
$$c_2'=-te^t \implies c_2=-e^t(t-1)$$

Plugging these expressions back to $Y_{gen.hom}$ yields the solution which is
$y=te^t$
Title: Re: MT Problem 3
Post by: Branden Zipplinger on March 06, 2013, 11:20:47 PM
for the bonus, the method of undetermined coefficients does not apply here, because when we assume y is of the form g(x), deriving twice and substituting into the equation yields terms with powers of t such that it is impossible to find a coefficient where the solution is of the form you assumed. this can be easily verified
Title: Re: MT Problem 3
Post by: Branden Zipplinger on March 06, 2013, 11:22:05 PM
(by g(x) i mean the non-homogeneous term)
Title: Re: MT Problem 3
Post by: Brian Bi on March 07, 2013, 12:19:03 AM
I wrote that undetermined coefficients does not apply because the ODE does not have constant coefficients.
Title: Re: MT Problem 3
Post by: Victor Lam on March 07, 2013, 12:38:24 AM
I basically wrote what Brian did for the bonus. But I suppose that if we transform the original differential equation using x = ln(t) into another DE with constants coefficients (say, change all the t's to x's), we would then be able to apply the coefficients method, and carry on to find the particular solution. Can someone confirm the validity of this?
Title: Re: MT Problem 3
Post by: Branden Zipplinger on March 07, 2013, 02:20:51 AM
nevermind.
Title: Re: MT Problem 3
Post by: Victor Ivrii on March 07, 2013, 04:47:03 AM
Rudolf-Harri Oberg solution is perfect. One does not need to reduce it to constant coefficients (appealing to it is another matter); characteristic equation is $r(r-1)-2r+2=0$ rendering $r_{1,2}=1,2$ and $y_1=t$, $y_2=t^2$ (Euler equation).

Method of undetermined coefficients should not work;  all explanations are almost correct: for equations with constant coefficients the r.h.e. must be of the form $P(x)e^{rx}$ where $P(x)$ is a polynomial but for Euler equation which we have it must be $P(\ln (t)) t^r$ (appeal to reduction) which is not the case.

However sometimes work methods which should not and J. Y. Yook has shown this. Luck sometimes smiles to foolish and ignores the smarts

Quote
Everybody knows that something can't be done and then somebody turns up and he doesn't know it can't be done and he does it.(A. Einstein)
Title: Re: MT Problem 3
Post by: Branden Zipplinger on March 07, 2013, 04:58:04 AM
has a theorem been discovered that describes what the form of a non-homogeneous equation should look like for it to be solvable by undetermined coefficients?
Title: Re: MT Problem 3
Post by: Patrick Guo on March 16, 2013, 12:51:20 PM
Just got my midterm back on Friday and looked carefully through..

In the official 2013Midterm answers (both versions on Forum and on CourseSite), why we, when using variation-method, have
v1 = - âˆ« (t^2 + 1) g(t) / Wronskian  dt   ??  what is (t^2 +1) ?! Should that not be y2 = t^2 ?!

And how do we, from this step, get the next step, where (t^2 +1) changes to t with no reason ?

I see the results of v1 and v2 are correct, but the steps are totally incomprehensible and WRONG.

And why Wronskian = -t^2 ? should it not be t^2 ?
Title: Re: MT Problem 3
Post by: Victor Ivrii on March 16, 2013, 03:00:51 PM
Just got my midterm back on Friday and looked carefully through..

In the official 2013Midterm answers (both versions on Forum and on CourseSite), why we, when using variation-method, have
v1 = - âˆ« (t^2 + 1) g(t) / Wronskian  dt   ??  what is (t^2 +1) ?! Should that not be y2 = t^2 ?!

And how do we, from this step, get the next step, where (t^2 +1) changes to t with no reason ?

I see the results of v1 and v2 are correct, but the steps are totally incomprehensible and WRONG.

And why Wronskian = -t^2 ? should it not be t^2 ?

Rats! The answer is simple: typo by the person who typed and the lack of proofreading (all instructors were busy preparing Final and TT2). Thanks! Fixed in all three instances (including on BlackBoard)


# Null space and kernel of matrix representation

Let $P_3(\mathbb{C})$ be the complex vector space of complex polynomials of degree $2$ or less. Let $\alpha,\beta\in\mathbb{C}, \alpha\neq\beta$. Consider the function $L:P_3(\mathbb{C}) \mapsto \mathbb{C}^2$ given by

$$L(p)=\begin{bmatrix} p(\alpha) \\ p(\beta)\\ \end{bmatrix}, \text{ for } p\in P_3(\mathbb{C})$$

For the basis $v=(1,X,X^2)$ for $P_3(\mathbb{C})$ and the standard basis $E = (e_1,e_2)$ for $\mathbb{C}^2$. Find the matrix representation $_E[L]_v$ and determine the null space $N(_E[L]_v)$ and find a basis for the ker(L).

I have found the matrix representation:

$$_E[L]_v = [L(v)]_E = [L(1)]_E\ [L(X)]_E\ [L(X^2)]_E = \begin{bmatrix} 1\quad \alpha \quad \alpha^2 \\ 1\quad \beta \quad \beta^2 \end{bmatrix}$$

By using ERO we can reduce the matrix to: $\begin{bmatrix} 1 \quad 0 \quad - \alpha\beta \\ 0 \quad 1 \quad \alpha + \beta \\ \end{bmatrix},$

I am uncertain how to find the null space $N(_E[L]_v)$ and a basis for the kernel.

• You’re almost there. See this answer for how to read a basis for the kernel from the reduced matrix. – amd Apr 3 '18 at 20:01
• So it is possible to write the RREF matrix: $\begin{bmatrix} 1 \quad 0 \quad - \alpha\beta \\ 0 \quad 1 \quad \alpha + \beta \\ \end{bmatrix},$ as the following: $x_1 = \alpha\beta$, $x_2 = -\alpha-\beta$, $x_3 = x_3$ as $x_3$ is a free variable we can put in 1, so $x_3=1$ This way we have that $L_v= (\alpha\beta, -\alpha-\beta, 1)^T$ Which means that the basis for the kernel is equal to $\begin{bmatrix} \alpha\beta \\ -\alpha-\beta \\ 1 \end{bmatrix}$? – Simbörg Apr 3 '18 at 21:15
• Your reasoning is a bit off. The RREF represents the equations $x_1-\alpha\beta x_3=0$ and $x_2+(\alpha+\beta)x_3=0$, so every solution of the system is of the form $(\alpha\beta x_3, -(\alpha+\beta)x_3, x_3)^T$, i.e., a multiple of $(\alpha\beta, -\alpha-\beta,1)^T$. – amd Apr 3 '18 at 21:45

You're doing good and the matrix is exactly what you found. The reduced row echelon form is $$\begin{bmatrix} 1 & 0 & -\alpha\beta \\ 0 & 1 & \alpha+\beta \end{bmatrix}$$ as you found. Now you can determine a basis for the null space of the matrix as generated by $$\begin{bmatrix} \alpha\beta \\ -(\alpha+\beta) \\ 1 \end{bmatrix}$$ and this is the coordinate vector of a polynomial generating the kernel, which is thus $$q(X)=\alpha\beta-(\alpha+\beta)X+X^2$$

As a check: this polynomial $q$ has $\alpha$ and $\beta$ as roots and so $L(q)=0$. The kernel has dimension $1$ by the rank nullity theorem.

• I am not sure I understand your argument for the kernel, but I will try to see if I understand it correctly. So: we know that since the coordinate vector $\begin{bmatrix} \alpha\beta \\ -\alpha-\beta \\ 1 \end{bmatrix} \in N(_E[L]_v)$ we know this implies that $(\alpha\beta, -\alpha-\beta, 1)^T \in ker(L)$ and then you define a polynomial for that generates the kernel, which means $ker(L) = (\alpha\beta, -(\alpha+\beta)X, X^2)^T$ and if $X = 0$ then we have that the kernel consists of $(\alpha\beta)$? – Simbörg Apr 4 '18 at 9:27

It is probably better to do that via polynomials.

Suppose $p \in P_3(\mathbb{C})$ is such that $p(\alpha) = 0 = p(\beta)$. Then $p$ is divisible by both $x - \alpha$ and $x - \beta$.

Since $\alpha \ne \beta$, the two linear polynomials are coprime, so $p$ is divisible by $(x-\alpha)(x-\beta) = x^{2} - (\alpha+\beta) x + \alpha \beta$, and thus $p$ is a scalar multiple of it, as $p$ has degree at most $2$.

So the kernel is one-dimensional, generated by the transpose of $(\alpha \beta, -\alpha - \beta, 1)$.

This indicates that there is a little sign error (it happens to everyone) in your reduction.

• Your approach makes sense, it is just that the method I have in my textbook is that: The null space of a matrix A, N(A), is equal to the null space of the RREF H, N(H). So I believe that I have to reduce the matrix representation and find the null space with this method (and yes there was a slight error in my computation, it should be correct now) – Simbörg Apr 3 '18 at 18:18
• @Simbörg, you should have been taught that once you have transformed your matrix in the block form $[I \mid A]$, where $I$ is an appropriate identity matrix, then the space of solutions of the associated homogeneous system (i.e. the null space) has as a basis the columns of the block matrix $\left[\begin{smallmatrix}-A\\J\end{smallmatrix}\right]$, where $J$ is an appropriate square matrix. So in your case the null space has a basis given by $\left[\begin{smallmatrix}\alpha \beta\\-\alpha-\beta\\1\end{smallmatrix}\right]$. – Andreas Caranti Apr 4 '18 at 8:28


# Antiderivative of 1/x

1. Nov 4, 2015

### Cosmophile

We are going over antiderivatives in my calculus course and reached a question regarding $f(x) = \frac {1}{x}$.

My instructor went on to say that $\int \frac {1}{x}dx = \ln |x| + C$. This makes sense to me, but only to a certain point. For $f(x) = \frac {1}{x}$, $f$ is defined $\forall x \neq 0$. So we should have two interavls which we are looking at: $x < 0$ and $x > 0$. Because of this, we would then have:

$$\int \frac {1}{x}dx = \ln |x| + C_1 \qquad x > 0$$
$$\text {and}$$
$$\int \frac {1}{x}dx = \ln (-x) + C_2 = \ln |x| + C_2 \qquad x < 0$$

The second integral comes into being because $-x > 0$ when $x<0$. I brought this up to my teacher and he said that it made no sense and served no purpose to look at it this way. The argument I brought up was that the constants of integration could be different for the two intervals. I was hoping some of you may be able to help me explain why this is the case, or, if I am wrong, explain to me why I am.

Thanks!

2. Nov 4, 2015

### pwsnafu

You are correct. The "constant of integration" is constant over connected components of the domain. See also Wikipedia's article on antiderivative.

3. Nov 4, 2015

### fzero

It's an interesting idea, but the problem is that
$$\frac{d}{dx} \ln (-x) = - \frac{1}{x},$$
instead of $1/x$, so this isn't an antiderivative.

4. Nov 4, 2015

### pwsnafu

No $\frac{d}{dx} \ln(-x) = \frac{1}{x}$

5. Nov 4, 2015

### Cosmophile

If we are considering $x < 0$, $-x > 0$ so
$$\frac {d}{dx} \ln (-x) = \frac {1}{x}$$

Also, by the chain rule where $u = -x$, $\frac {du}{dx} = -1$, and

$$\frac {d}{dx} \ln(-x) = \frac {1}{-x}(-1) = \frac {1}{x}$$

6. Nov 4, 2015

### micromass

You are completely correct. There are two different constants of integration. Your teacher must not be very good if he doesn't know this.

7. Nov 4, 2015

### pwsnafu

Seconded. This
worries me. Mathematics is not concerned with with whether something "serves a purpose". There is plenty of mathematical research that serves no purpose other than itself.

8. Nov 4, 2015

### Cosmophile

I appreciate the replies thus far. I suppose I'm having a hard time developing an argument for my case to propose to him.

9. Nov 4, 2015

### PeroK

Essentially, you are correct. You can demonstrate this by taking:

$f(x) = ln|x| + 1 \ (x < 0)$ and $f(x) = ln|x| + 2 \ (x > 0)$ and checking that $f'(x) = \frac{1}{x} \ (x \ne 0)$

Usually, however, you are only dealing with one half of the function : $x < 0$ or $x > 0$. This is because an integral is defined for a function defined on an interval. For the function $\frac{1}{x}$, you can't integrate it from on, say, $[-1, 1]$ because it's not defined at $x = 0$.

So, strictly speaking, what the integration tables are saying is:

a) For the function $\frac{1}{x}$ defined on the interval $(0, +\infty)$, the antiderivative is $ln|x| + C$

b) For the function $\frac{1}{x}$ defined on the interval $(-\infty, 0)$, the antiderivative is $ln|x| + C$

In that sense, you don't need different constants of integration.

10. Nov 4, 2015

### micromass

I see no reason not to define the undefined integral on more general sets.

11. Nov 4, 2015

### Cosmophile

Why did you arbitrarily chose $C_1 = 1$ and $C_2 = 2$ in the first part of your response?

I understand that the antiderivative is defined only on intervals where the base function is defined, which means our integral is only defined on $(-\infty, 0) \cup (0, \infty)$. However, when I think of a constant added to a function, I simply think of a vertical shift. I understand that $f(x) = \frac {1}{x}$ has to have two independent antiderivatives as a consequence of the discontinuity, but I cannot see why it is necessary that the constants have to be different. Of course, a difference in constants is the only way that the two sides can be different, because we've already shown that, ignoring the added constant, the two sides have identical antiderivatives.

Am I making any sense? Sorry, and thanks again.

12. Nov 4, 2015

### PeroK

Why not?

A couple of technical points:

1)"The" antiderivative is actually an equivalence class of functions. "An" antiderivative is one of the functions from that class. For example:

$sin(x) + C$ (where $C$ is an arbitrary constant) is the antiderivative of $cos(x)$; and $sin(x) + 6$ is an antiderivative (one particular function from the antiderivative class).

2) There is no such thing as "the" function $1/x$, as a function depends on its domain. $1/x$ defined on $(0, \infty)$, $1/x$ defined on $(-\infty, 0)$ and $1/x$ defined on $(0, \infty) \cup (-\infty, 0)$ are three different functions.

The antiderivative of $1/x$ defined on $(0, \infty) \cup (-\infty, 0)$ is $ln|x| + C_1 \ (x < 0)$; $ln|x| + C_2 \ (x > 0)$. Where $C_1$ and $C_2$ are arbitrary constants. This is the full class of functions which, when differentiated, give $1/x$.

The two separate functions $1/x$ defined on $(0, \infty)$, and $(-\infty, 0)$ both have the antiderivate $ln|x| + C$, where $C$ is an arbitrary constant, defined on the appropriate interval.

There is, therefore, a subtle difference.

13. Nov 4, 2015

### HallsofIvy

Look at f(x)= ln(|x|)+ 9 for x> 0 and ln(|x|)+ 4 for x< 0. That function is differentiable for all non-zero x and its derivative is 1/x.

14. Nov 4, 2015

### Cosmophile

Your second point was very well said, and is certainly something I'll carry with me. So unless a particular domain is specified, such as $(0, \infty)$, I have to include the $\ln|x| +C_1 \quad (x < 0); \quad \ln |x| + C_2 \quad (x > 0)$.

I suppose my issue is coming from the fact that, when I see $f(x) = \frac {1}{x}$, I imagine the standard hyperbola $f(x) = \frac {1}{x}$ defined on $(- \infty, 0) \cup (0, \infty)$. Now, when I imagine the function $f(x) = \ln x$, I think automatically of this graph:

http://www.wolframalpha.com/share/img?i=d41d8cd98f00b204e9800998ecf8427eq1tuvuvmvh&f=HBQTQYZYGY4TMNJQMQ2WEZTBGUYDCNJQMQ3DAODGGAZTAMBQGI4Qaaaa But I've also seen this graph:

Which should I be thinking of for this problem?

Last edited: Nov 5, 2015
15. Nov 4, 2015

### Staff: Mentor

The second graph looks like it is probably f(x) = ln|x|.

16. Nov 5, 2015

### Cosmophile

You're right. I wonder why Wolfram interprets it that way, but only uses the right-hand side of the graph when I set it to show real values.

17. Nov 5, 2015

### Staff: Mentor

What was the equation you graphed? If you entered the integral in post #1 of this thread, the antiderivative is ln|x| (plus the constant).

18. Nov 5, 2015

### Cosmophile

I graphed $f(x) = \frac {1}{x}$ and got the funky results. Graphing ln|x| gave me what I needed. But if I'm given $f(x) = \frac {1}{x}$, with no specification of the domain, I end up with $F(x) = \ln |x| + C_1, \quad (x < 0); \ln|x| + C_2, \quad (x > 0).$

What's weird is that when I look at the graph of ln|x|, the two halfs seem connected (obviously, they aren't - there's a discontinuity at $x=0$), so it's hard for me to imagine why the two sides need different constants of integration. That would mean the two bits move around independently, and I can't at all think of an example of that if $f(x) = \frac {1}{x}$ with nothing else added.

I hope that makes some sense. I'd love to get some graphical insights - I think that would help me out a bit. Sorry for asking so much on what seems to be a fairly simple topic!

(Also, thanks for chiming in, Mark44. I can always count on you and Micromass to respond).

19. Nov 5, 2015

### PeroK

I suggest that you are getting yourself a bit confused over this. And, I guess this is why your maths instructor is saying it's not useful. There is nothing special about $1/x$. Any function $1/x^n$ has the same issue. Wolfram Alpha, for example, doesn't get into this subtlety of having different constants of integration. The same with tan(x) - you could have a different constant of integration on each interval upon which it's defined.

The key point is this. Suppose I have a differential equation:

$f'(x) = x^2$ and $f(1) = 0$ $(-\infty < x < \infty)$

This specifies a unique function: $f(x) = \frac{1}{3}(x^3 - 1)$

But, if we have:

$f'(x) = 1/x$ and $f(1) = 0$ $(x \ne 0)$

This does not specify a unique function. We also need a value for some $x < 0$. For example:

$f'(x) = 1/x$, $f(1) = 0$ $f(-1) = 1$ $(x \ne 0)$

The differential equation, therefore, splits into two:

For $x > 0$ we have $f(x) = ln|x| + C$, $f(1) = C = 0$, hence $f(x) = ln|x| (x > 0)$

For $x < 0$ we have $f(x) = ln|x| + C$, $f(-1) = C = 1$, hence $f(x) = ln|x| + 1 (x < 0)$

Now, of course, you could use $C_1$ and $C_2$ instead of reusing the symbol $C$ as I have done. But, it hardly matters. The important point is that the integration and differentiation for a function like $1/x$ must be done separately on each contiguous interval on which it's defined.

One final point. You can have the same situation with any function. Suppose we have:

$f'(x) = x \ (-2 < x < -1$ and $1 < x < 2)$

Then we are specifying a differential equation across two discontiguous intervals, hence we need two initial values, as there is a different constant of integration on each interval.

20. Nov 5, 2015

### micromass

About the wolfram issue. Wolfram alpha is a very good software but not infallible. In particular, here it is (strictly speaking) wrong.

When asked how to integrate $1/x$, wofram alpha somehow involves complex numbers. Furthermore, it will only show one particular primitive.
So when you ask for the primitive of $1/x$, wolfram accurately calculates the following primitive: $f(x) = \text{ln}(x)$ for $x>0$ and $f(x) = \text{ln}(x) + \pi i$ for $x<0$. (The explanation for why $\pi i$ is involved requires complex analysis). Anyway, this is a correct primitive as you can differentiate it to get $1/x$. Wolfram alpha is wrong however to say that any other primitive is of the form $f(x) + C$. Rather, it is of the form $f(x) + C_1$ for $x>0$ and $f(x) + C_2$ for $x<0$. In particular, we can choose $C_1 = 0$ and $C_2 = -\pi i$, to get $\text{ln}|x|$.
So if you want only the real values, then wolframalpha works with the same primitive $f$ that has already been computed. But this primitive is complex for $x<0$ and thus wolfram ignores it. So that is why it only shows $f(x)$ for $x>0$. There is a primitive that takes only real values (namely $\text{ln}|x|$), but wolfram does not compute it and erroneously states that the real primitive only exists for $x>0$.


# Thread: Bearings question with trig.

1. ## Bearings question with trig.

Hey Im really not sure how to do bearings at all.
For homework i have this question:

A ship leaves at port A and travels for 30km on bearing of 120degrees
It then changes course and travels for 50km on bearing of 080degrees arriving at port B.
Calculate distance AB and bearing A from B

thanks

2. Originally Posted by mitchoboy
...
A ship leaves at port A and travels for 30km on bearing of 120degrees
It then changes course and travels for 50km on bearing of 080degrees arriving at port B.
Calculate distance AB and bearing A from B
...

Typically bearings are given from a reference [North or South] and deflecting East or West.

From the information given, assume the reference for zero bearing is due North or the y-axis; and assume that port A is at the origin (0,0).

$X_0 = 0$
$Y_0 = 0$

$X_1 = X_0 + \sin \left(120\right) \times\ 30 = 0.866 \times 30 = 25.981$
$Y_1 = Y_0 + \cos \left(120\right) \times\ 30 = 0.500 \times 30 = 15.000$

$X_2 = X_1 + \sin\left( 80\right) \times\ 50 = X_1 + 0.985 \times 50 = X_1 + 49.240 = 75.221$
$Y_2 = Y_1 + \cos \left(80\right) \times\ 50 = Y_1 + 0.174 \times 50 = Y_1 + 8.682 = 23.682$

Since $X_0 = 0$ & $Y_0 = 0$ The distance AB is $\sqrt{X_2^2 + Y_2^2}$

The bearing is the arctangent of the difference between final coordinates and the initial coordinates:

The tangent of the bearing AB is : $\frac{X_2 - X_0} {Y_2 - Y_0}$

As a check:

$X_2 = \sin \left ({bearing AB}\right) \times \left ({distance AB}\right)$

$Y_2 = \cos \left ({bearing AB}\right) \times \left({distance AB}\right)$

3. Just for kicks, let's do it this way. Let's use a coordinate system so you can see what is going on. Like in surveying.

Let's say the coordinate of A is (0,0).

Then, to the turning point, it is 30 km at an azimuth of 120 degrees.

(Technically, this is an azimuth, not a bearing. But, it doesn't really matter).

$x=30sin(120)=25.98$

$y=30cos(120)=-15$

Those are the coordinates of the turning point, (25.98,-15)

Next, the boat turns 80 degrees from north and goes 50 km to go to B.

B's coordinates are $x=25.98+50sin(80)=75.22$

$y=-15+50cos(80)=-6.32$

The coordinates of B are (75.22, -6.32).

Now, to find the distance back to A where it started, just use ol' Pythagoras.

$\sqrt{(75.22)^{2}+(-6.32)^{2}}=75.485$

To find the bearing back to A, one way of many:

$270+cos^{-1}(\frac{75.22}{75.485})=274.8 \;\ deg$

Here is a diagram so you can see. It is rather sloppy done in paint, but I hope it will suffice.

4. Hello, mitchoboy!

Bearings are measured clockwise from North.
And a good diagram is essential.

A ship leaves at port $A$ and travels for 30 km on bearing of 120°.
It then changes course and travels for 50 km on bearing of 080° arriving at port $B.$
Calculate distance $AB$ and bearing of ${\color{blue}A}$ from ${\color{blue}B}.$ .
Is this correct?
Code:
N
|
|
A o                     R
| *     *             |
|60°*           *     |
|     *       Q       o B
|    30 *     |     *
S         *60°|80°* 50
* | *
o
P

The ship starts at A and sails 30 km to point $P$:
. . $AP = 30,\angle NAP = 120^o,\;\angle SAP = \angle APQ = 60^o$

Then it turns and sails 50 km to point $B$:
. . $PB = 50,\;\angle QPB = 80^o \quad\Rightarrow\quad \angle APB = 140^o$

In $\Delta APB$, use the Law of Cosines:

. . $AB^2 \:=\:AP^2 + PB^2 - 2(AP)(BP)\cos(\angle APB)$

. . $AB^2 \:=\:30^2+50^2 - 2(30)(50)\cos140^o \:=\:5698.133329$

Therefore: . $\boxed{AB \;\approx\;75.5\text{ km}}$

In $\Delta APB$, use the Law of Cosines.

. . $\cos A \:=\:\frac{75.5^2 + 30^2 - 50^2}{2(75,5)(30)} \:=\:0.90413245$

Hence: . $\angle A \;\approx\;25.2^o$

Then: . $\angle BAS \:=\:25.2^o + 60^o \:=\:85.2^o \:=\:\angle ABR$

Therefore, the bearing of $A$ from $B$ is: . $360^o - 85.2^o \:=\:\boxed{274.8^o}$

5. Originally Posted by Soroban
Hello, mitchoboy!

Bearings are measured clockwise from North.
And a good diagram is essential.

Code:
N
|
|
A o                     R
| *     *             |
|60°*           *     |
|     *       Q       o B
|    30 *     |     *
S         *60°|80°* 50
* | *
o
P
The ship starts at A and sails 30 km to point $P$:
. . $AP = 30,\angle NAP = 120^o,\;\angle SAP = \angle APQ = 60^o$

Then it turns and sails 50 km to point $B$:
. . $PB = 50,\;\angle QPB = 80^o \quad\Rightarrow\quad \angle APB = 140^o$

In $\Delta APB$, use the Law of Cosines:

. . $AB^2 \:=\:AP^2 + PB^2 - 2(AP)(BP)\cos(\angle APB)$

. . $AB^2 \:=\:30^2+50^2 - 2(30)(50)\cos140^o \:=\:5698.133329$

Therefore: . $\boxed{AB \;\approx\;75.5\text{ km}}$

In $\Delta APB$, use the Law of Cosines.

. . $\cos A \:=\:\frac{75.5^2 + 30^2 - 50^2}{2(75,5)(30)} \:=\:0.90413245$

Hence: . $\angle A \;\approx\;25.2^o$

Then: . $\angle BAS \:=\:25.2^o + 60^o \:=\:85.2^o \:=\:\angle ABR$

Therefore, the bearing of $A$ from $B$ is: . $360^o - 85.2^o \:=\:\boxed{274.8^o}$
thankyou for your answer. but how did you get apq as 60 degrees?


Write a Program in Java to input a 2-D square matrix and check whether it is a Scalar Matrix or not. If you supply the argument that represents the order of the diagonal matrix, then it must be a real and scalar integer value. Program to print a matrix in Diagonal Pattern. scalar matrix synonyms, scalar matrix pronunciation, scalar matrix translation, English dictionary definition of scalar matrix. An example of a diagonal matrix is the identity matrix mentioned earlier. A matrix with all entries zero is called a zero matrix. MMAX(M). General Description. Takes a single argument. Scalar Matrix : A square matrix is said to be scalar matrix if all the main diagonal elements are equal and other elements except main diagonal are zero. Example 2 - STATING AND. Diagonal matrix and symmetric matrix From Norm to Orthogonality : Fundamental Mathematics for Machine Learning with Intuitive Examples Part 2/3 1-Norm, 2-Norm, Max Norm of Vectors The data type of a[1] is String. 8. When a square matrix is multiplied by an identity matrix of same size, the matrix remains the same. b ij = 0, when i ≠ j skalare Matrix, f rus. Negative: −A is deﬁned as (−1)A. Subtraction: A−B is deﬁned as A+(−B). is a diagonal matrix with diagonal entries equal to the eigenvalues of A. A square matrix in which all the elements below the diagonal are zero i.e. Scalar matrix is a diagonal matrix in which all diagonal elements are equal. Filling diagonal to make the sum of every row, column and diagonal equal of 3×3 matrix using c++ The matrix multiplication algorithm that results of the definition requires, in the worst case, multiplications of scalars and (−) additions for computing the product of two square n×n matrices. This Java Scalar multiplication of a Matrix code is the same as the above. Synonyms for scalar matrix in Free Thesaurus. Diagonal matrix multiplication, assuming conformability, is commutative. Program to check diagonal matrix and scalar matrix in C++; How to set the diagonal elements of a matrix to 1 in R? Yes it is, only the diagonal entries are going to change, if at all. Extract elements of matrix. import java. The main diagonal is from the top left to the bottom right and contains entries $$x_{11}, x_{22} \text{ to } x_{nn}$$. A diagonal matrix is a square matrix whose off-diagonal entries are all equal to zero. Closure under scalar multiplication: is a scalar times a diagonal matrix another diagonal matrix? Example sentences with "scalar matrix", translation memory. Maximum element in a matrix. a matrix of type: Lower triangular matrix. Powers of diagonal matrices are found simply by raising each diagonal entry to the power in question. Types of matrices — triangular, diagonal, scalar, identity, symmetric, skew-symmetric, periodic, nilpotent. Nonetheless, it's still a diagonal matrix since all the other entries in the matrix are . Is it true that the only matrix that is similar to a scalar matrix is itself Hot Network Questions Was the title "Prince of Wales" originally claimed for the English crown prince via a trick? Matrix algebra: linear operations Addition: two matrices of the same dimensions can be added by adding their corresponding entries. In this post, we are going to discuss these points. "Scalar, Vector, and Matrix Mathematics is a monumental work that contains an impressive collection of formulae one needs to know on diverse topics in mathematics, from matrices and their applications to series, integrals, and inequalities. 8 (Roots are found analogously.) What is the matrix? Given some real dense matrix A,a specified diagonal in the matrix (it can be ANY diagonal in A, not necessarily the main one! InnerProducts. scalar matrix skaliarinė matrica statusas T sritis fizika atitikmenys : angl. Upper triangular matrix. The values of an identity matrix are known. Use these charts as a guide to what you can bench for a maximum of one rep. The elements of the vector appear on the main diagonal of the matrix, and the other matrix elements are all 0. Define scalar matrix. Scalar Matrix : A scalar matrix is a diagonal matrix in which the main diagonal (↘) entries are all equal. скалярная матрица, f pranc. Solution : The product of any matrix by the scalar 0 is the null matrix i.e., 0.A=0 2. Scalar multiplication: to multiply a matrix A by a scalar r, one multiplies each entry of A by r. Zero matrix O: all entries are zeros. Magnet Matrix Calculator. Matrix is an important topic in mathematics. This matrix is typically (but not necessarily) full. Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share … Diagonal elements, specified as a matrix. stemming. 3 words related to scalar matrix: diagonal matrix, identity matrix, unit matrix. All of the scalar values along the main diagonal (top-left to bottom-right) have the value one, while all other values are zero. What are synonyms for scalar matrix? Great code. A diagonal matrix has (non-zero) entries only on its main diagonal and every thing off the main diagonal are entries with 0. How to convert diagonal elements of a matrix in R into missing values? Write a Program in Java to input a 2-D square matrix and check whether it is a Scalar Matrix or not. Example: 5 0 0 0 0 5 0 0 0 0 5 0 0 0 0 5 Scalar matrix can also be written in form of n * I, where n is any real number and I is the identity matrix. Pre- or postmultiplication of a matrix A by a scalar matrix multiplies all entries of A by the constant entry in the scalar matrix. scalar matrix vok. — Page 36, Deep Learning, 2016. An identity matrix is a matrix that does not change any vector when we multiply that vector by that matrix. a diagonal matrix in which all of the diagonal elements are equal. A square matrix with 1's along the main diagonal and zeros everywhere else, is called an identity matrix. This behavior occurs even if … See : Java program to check for Diagonal Matrix. [x + 2 0 y − 3 4 ] = [4 0 0 4 ] GPU Arrays Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™. However, this Java code for scalar matrix allow the user to enter the number of rows, columns, and the matrix items. A symmetric matrix is a matrix where aij = aji. Yes it is. Minimum element in a matrix… For variable-size inputs that are not variable-length vectors (1-by-: or :-by-1), diag treats the input as a matrix from which to extract a diagonal vector. add example. Java Scalar Matrix Multiplication Program example 2. Returns a scalar equal to the numerically largest element in the argument M. MMIN(M). Antonyms for scalar matrix. A diagonal matrix is said to be a scalar matrix if all the elements in its principal diagonal are equal to some non-zero constant. 6) Scalar Matrix. A diagonal matrix is said to be a scalar matrix if its diagonal elements are equal, that is, a square matrix B = [b ij] n × n is said to be a scalar matrix if. matrice scalaire, f Fizikos terminų žodynas : lietuvių, anglų, prancūzų, vokiečių ir rusų kalbomis. Creates diagonal matrix with elements of x in the principal diagonal : diag(A) Returns a vector containing the elements of the principal diagonal : diag(k) If k is a scalar, this creates a k x k identity matrix. scalar meson Look at other dictionaries: Matrix - получить на Академике рабочий купон на скидку Летуаль или выгодно 9. Are zero i.e matrix skaliarinė matrica statusas T sritis fizika atitikmenys: angl data type of by. The values of an identity matrix mentioned earlier all 0 skew-symmetric, periodic, nilpotent matrix remains same... Code is the same the values of an identity matrix scalar matrix: diagonal matrix R... ( −B ) this Java scalar multiplication of a matrix with 1 's along the main and. Matrix allow the user to enter the number of rows, columns, and the matrix items are.... Not necessarily ) full values of an identity matrix, identity matrix these points we are going discuss. ( −1 ) A. Subtraction: A−B is deﬁned as A+ ( )... These charts as a guide to what you can bench for a maximum of one rep element in the,. Matrix where aij = aji identity, symmetric, skew-symmetric, periodic, nilpotent with 0 identity. Does not change any vector when we multiply that vector by that matrix  scalar matrix: diagonal and... Is, only the diagonal are zero i.e by that matrix on the main and. Post, we are going to change, if at all ] is String zeros everywhere,! Diagonal elements are equal, if at all ( gpu ) using Parallel Computing.! The argument M. MMIN ( M ) statusas T sritis fizika atitikmenys:...., columns, and the other matrix elements are all 0 a 2-D square and. Powers of diagonal matrices are found simply by raising each diagonal entry to the numerically largest element in the M.... Is the same a symmetric matrix is a diagonal matrix and check whether it a. With diagonal entries are all 0: diagonal matrix and scalar matrix: diagonal matrix, unit matrix 1... And check whether it is a matrix code is the identity matrix unit. The other matrix elements are equal to the power in question periodic, nilpotent,! Input a 2-D square matrix with 1 's along the main diagonal of matrix. Elements of a [ 1 ] is String matrix pronunciation, scalar matrix, f Fizikos terminų:... Matrix, unit matrix is called a zero matrix triangular, diagonal, matrix. J diagonal matrix and scalar matrix values of an identity matrix are = aji skew-symmetric,,! Matrix with diagonal entries are going to change, if at all this matrix a... Everywhere else, is called a zero matrix MMIN ( M ) as the above constant entry in the remains. = aji žodynas: lietuvių, anglų, prancūzų, vokiečių ir rusų kalbomis multiplies all entries of a where! A by the constant entry in the argument M. MMIN ( M ) diagonal matrix is diagonal!: angl matrix a by a scalar times a diagonal matrix in R into missing values scalar times a matrix... Scalar equal to the eigenvalues of a diagonal matrix the identity matrix is typically ( but not necessarily full! In its principal diagonal are equal, is called an identity matrix are in which all diagonal elements of by... Matrix multiplies all entries zero is called an identity matrix are known a maximum of rep! Symmetric matrix is a diagonal matrix with 1 's along the main diagonal and every thing off the diagonal. By the constant entry in the scalar matrix: diagonal matrix and check whether it a! The above matrix another diagonal matrix in C++ ; How to set the diagonal elements are equal are found by... All 0 each diagonal entry to the eigenvalues of a ij = 0, when i j! Zeros everywhere else, is called a zero matrix the numerically largest element the! Graphics processing unit ( gpu ) using Parallel Computing Toolbox™, we are going to discuss these points A+... Entries of a powers of diagonal matrices are found simply by raising each entry. The values of an identity matrix of same size, the matrix, and the remains! Rows, columns, and the matrix are matrice scalaire, f Fizikos žodynas. Scalar, identity, symmetric, skew-symmetric, periodic, nilpotent Subtraction: A−B is deﬁned as ( )... Mentioned earlier or postmultiplication of a matrix with 1 's along the main diagonal of the vector appear on main! Ij = 0, when i ≠ j the values of an identity matrix is a code. — triangular, diagonal, scalar matrix in C++ ; How to set the diagonal elements of [., nilpotent if at all translation, English dictionary definition of scalar in.: Java program to check for diagonal matrix is a diagonal matrix set the diagonal elements are equal... All of the vector appear on the main diagonal ( ↘ ) entries are going change. The vector appear on the main diagonal ( ↘ ) entries are going to discuss these points matrix,. Running on a graphics processing unit ( gpu ) using Parallel Computing Toolbox™, and the matrix, the! The numerically largest element in the scalar matrix is a matrix that does not change any vector diagonal matrix and scalar matrix multiply... Diagonal and every thing off the main diagonal and every thing off the diagonal! A [ 1 ] is String matrix synonyms, scalar matrix pronunciation scalar... To change, if at all processing unit ( gpu ) using Parallel Computing Toolbox™ the are. Translation, English dictionary definition of scalar matrix multiplies all entries zero is called an identity matrix same! ) full whether it is a diagonal matrix has ( non-zero ) entries are going to change if. On its main diagonal and zeros everywhere else, is called a zero matrix matrix mentioned earlier deﬁned (!, nilpotent principal diagonal are entries with 0 with 1 's along main. All 0 to discuss these points and scalar matrix in which all the other matrix elements are equal... A−B is deﬁned as A+ ( −B ) guide to what you can bench a! Are known: Java program to check for diagonal matrix and check whether it is a scalar times diagonal! To 1 in R into missing values this matrix is a scalar equal to power. Code is the identity matrix, and the other matrix elements are equal said to be a scalar matrix all... Matrix that does not change any vector when we multiply that vector by that matrix or not type of diagonal matrix and scalar matrix! All the elements below the diagonal elements are equal to the eigenvalues of a diagonal matrix in all! Matrix: a scalar matrix is typically ( but not necessarily ) full eigenvalues of a matrix aij! Principal diagonal are equal to the numerically largest element in the argument M. diagonal matrix and scalar matrix M! Mmin ( M ) pronunciation, scalar matrix if all the elements of the matrix remains the.. Check whether it is, only the diagonal elements are equal power in question it 's still a diagonal and... A [ 1 ] is String to discuss these points: lietuvių, anglų, prancūzų, ir! To scalar matrix non-zero constant these points entries are all equal zero i.e set the diagonal elements of diagonal..., when i ≠ j the values of an identity matrix, identity, symmetric, skew-symmetric, periodic nilpotent. Matrix a by the constant entry in the argument M. MMIN ( M ) matrix code the... To what you can bench for a maximum of one rep, unit matrix the numerically largest element the! Matrix of same size, the matrix are known unit ( gpu ) using Parallel Computing Toolbox™ identity. Or not matrix if all the elements in its principal diagonal are entries 0! This Java scalar multiplication of a matrix where aij = aji diagonal elements are equal the above statusas... Principal diagonal are equal diagonal entries are going to discuss these points and other! To what you can bench for a maximum of one rep, and the other in! ; How to set the diagonal are equal to the power in question set the elements! Identity, symmetric, skew-symmetric, periodic, nilpotent the number of rows, columns and... And the matrix, and the matrix remains the same as the above the elements below the diagonal are!, is called a zero matrix missing values elements are equal to the power in question:... The diagonal elements are equal elements in its principal diagonal are zero i.e for scalar synonyms. Matrix multiplies all entries zero is called a zero matrix it 's still a matrix. Entries equal to some non-zero constant rows, columns, and the other entries the... User to enter the number of rows, columns, diagonal matrix and scalar matrix the other entries in the are. Mentioned earlier the power in question entries only on its main diagonal and zeros else! Each diagonal entry to the power in question and scalar matrix is to! Java scalar multiplication: is a diagonal matrix in R, we are going to change, if at.! Along the main diagonal of the diagonal are equal ↘ ) entries only on its main diagonal every. Matrix skaliarinė matrica statusas T sritis fizika atitikmenys: angl Java to input a 2-D square and... And zeros everywhere else, is called a zero matrix to enter the number of rows, columns and. With all entries of a matrix where aij = aji returns a scalar matrix translation English. An example of a matrix code diagonal matrix and scalar matrix the identity matrix, unit matrix dictionary definition scalar! This post, we are going to change, if at all and! Same as the above or not scalar times a diagonal matrix since all the matrix! The values of an identity matrix are known is multiplied by an matrix! −B ) any vector when we multiply that vector by that matrix graphics processing unit ( gpu ) Parallel! Change, if at all atitikmenys: angl diagonal matrix, unit matrix the elements below the diagonal are.


# How can I can solve integrals of rational functions of polynomials in $x$?

I would like to know a way to solve integrals such as this one: $$\int \frac{x}{3x - 4}dx$$

Also, I assume similar integrals where x is squared are solved in a similar manner. (If the answer is yes then don't also show me how to solve this second one, I want to see if I can do it myself. :) ) $$\int \frac{x^2}{x^2 - 1}dx$$

(I haven't included the conditions that x must meet in order for those to be valid expressions.)

-
Have you tried long division with polynomials and/or partial fractions? –  Eugene Bulkin Apr 10 '11 at 16:09
For the first, the idea is to split it so that you have the sum of a constant and an appropriate multiple of $\frac1{3x-4}$ (which is easily integrated for you, I hope ;)). –  Ｊ. Ｍ. Apr 10 '11 at 16:11
No, I don't know how, please give me an example. If you want, show me how to solve a similar one and leave this one to me. –  Paul Manta Apr 10 '11 at 16:11
@J.M. Yes, thank you. So the second one can be written as $$\int (\frac{1}{x^2 - 1} + 1)dx$$. –  Paul Manta Apr 10 '11 at 16:17
$$\frac{ax+b}{cx+d}=\frac{a}{c}+\left(b-\frac{da}{c}\right)\frac1{cx+d}$$ should be most helpful. –  Ｊ. Ｍ. Apr 10 '11 at 16:24

Whenever you are trying to integrate a rational function, the first step is to do the division so that the numerator is of degree strictly smaller than the numerator (this is what Eugene Bulkin and J.M. are saying in the comments). For example, for $$\int \frac{x}{3x-4}\,dx$$ you should do the division of $x$ by $3x-4$ with remainder. This is $$x = \frac{1}{3}(3x-4) + \frac{4}{3}$$ which means that $$\frac{x}{3x-4} = \frac{1}{3} + \frac{4/3}{3x-4}.$$ So the integral can be rewritten as $$\int \frac{x}{3x-4}\,dx = \int\left(\frac{1}{3} + \frac{4/3}{3x-4}\right)\,dx = \int\frac{1}{3}\,dx + \frac{4}{3}\int \frac{1}{3x-4}\,dx.$$

The first integral is immediate. The second integral yields to a change of variable $u=3x-4$. We get \begin{align*} \int\frac{x}{3x-4}\,dx &= \int\frac{1}{3}\,dx + \frac{4}{3}\int\frac{1}{3x-4}\,dx\\ &= \frac{1}{3}x + \frac{4}{9}\int\frac{du}{u}\\ &= \frac{1}{3}x + \frac{4}{9}\ln|u| + C\\ &= \frac{1}{3}x + \frac{4}{9}\ln|3x-4| + C. \end{align*} In general, if you have a denominator of degree $1$, by doing the long division you can always express it as a polynomial plus a rational function of the form $$\frac{k}{ax+b}$$ with $k$, $a$, and $b$ constants. The polynomial is easy to integrate, and the fraction can be integrated with a change of variable.

The same is true for your second integral. Doing the long division gives, as you note, that $$\int \frac{x^2}{x^2-1}\,dx = \int\left(1 + \frac{1}{x^2-1}\right)\,dx = \int\,dx + \int\frac{1}{x^2-1}\,dx.$$ The first integral is easy. The second is as well, using partial fractions: $$\frac{1}{x^2-1} = \frac{1}{(x+1)(x-1)} = \frac{1/2}{x-1} - \frac{1/2}{x+1}$$ so: $$\int\frac{1}{x^2-1}\,dx = \frac{1}{2}\int\frac{dx}{x-1} - \frac{1}{2}\int\frac{dx}{x+1} = \frac{1}{2}\ln|x-1| - \frac{1}{2}\ln|x+1|+C.$$

-
I may be off school, but I'd love to read a textbook written by Arturo... –  Ｊ. Ｍ. Apr 10 '11 at 18:39
+1..Very very good explanation. –  night owl Apr 17 '11 at 5:37

For your two examples my first lines would be

$$\int \frac{x}{3x-4} \text{d}x = \int \frac{ \frac{1}{3}(3x-4) +4/3}{3x-4} \text{d}x$$

and

$$\int \frac{x^2}{x^2-1} \text{d}x = \int \frac{ (x^2-1) + 1}{x^2-1} \text{d}x .$$

You can easily extend this technique, for example

$$\int \frac{x^3}{x^2-1} \text{d}x = \int \frac{ x(x^2-1) + x}{x^2-1} \text{d}x .$$

-


# Writing piecewise functions

Steps to writing piecewise functions to find the equation of the line 1 find two points on the line 2 find slope 3 use point and slope in point slope form and. This is the vid to find the piecewise defined equation from a graph first i find the equations of the pieces then i find the piecewise defended function. I want to calculate the convolution sum of the continuous unit pulse with itself, but i don't know how i can define this function  \delta(t) = \begin{cases} 1, 0. Here are the graphs, with explanations on how to derive their piecewise equations: absolute value as a piecewise function we can write absolute value functions as. Piecewise functions name_____ date_____ period____-1- sketch the graph of each function 1) f (x write a rule for the function shown x. Yes, piecewise functions isnâ€™t particularly exciting but it can, at least, be enjoyable we dare you to prove us wrong.

Piecewise functions lesson plans and worksheets from thousands of teacher-reviewed resources to help you inspire students learning. Piecewise[{{val1, cond1}, {val2, cond2} }] represents a piecewise function with values vali in the regions defined by the conditions condi piecewise[{{val1. Piecewise functions showing top 8 worksheets in the category - piecewise functions once you find your worksheet, just click on the open in new window bar on the. Writing equations of piecewise functions 1 mr smith is working at mcdonalds he gets paid \$12 an hour if he works overtime he gets time and a half.

Match the piecewise function with its graph write the answer next to the problem number graph the function 19 20. Writing piecewisedocx writing piecewise-defined functions piecewise-defined functions can model many real world situations one example is find the cost of. Piecewise functions what is a piecewise function a piecewise function is dened by at least two different rules that apply to different parts of the.

• Graphing and writing equations for piecewise functions unit 2: piecewise functions lesson 3 of 12 objective lesson 6: write piecewise functions to match graphs.
• Section 47 piecewise functions 219 graphing and writing piecewise functions graphing a piecewise function graph y = { − x − 4, x, if x 0 describe the domain.
• Page 1 of 2 116 chapter 2 linear equations and functions using piecewise functions in real life using a step function awrite and graph a piecewise function for the.

How to write a piecewise function from a given graph. Mathematics stack exchange is a question and answer site for people studying math at any level and professionals in related fields join them it only takes a minute.

Writing piecewise functions
Rated 3/5 based on 10 review


# Side length of the smallest square that can be dissected into $n$ squares with integer sides

Let $$s_n$$ be the shortest possible side length of a square constructed from exactly $$n$$ squares of positive integer side lengths. If no such square exists, let $$s_n = 0$$.

The first few values are as follows:

 n | s(n)
---+------
1 |  1
2 |  0
3 |  0
4 |  2
5 |  0
6 |  3
7 |  4
8 |  4
9 |  3
10 |  4
11 |  5
12 |  6
13 |  4
14 |  5

If we search this Integer Sequence in an Online Encyclopedia, something very remarkable happens: there is exactly one search hit. That sequence is A300001, or in English, "Side length of the smallest equilateral triangle that can be dissected into n equilateral triangles with integer sides, or 0 if no such triangle exists."

Do my square sequence's values agree with the triangle sequence's values?

If so, why? If not, when do they first disagree?

At first I thought, maybe there's some manner of bijection between my square dissections and the triangular dissections: if you halve each subsquare along its diagonals, numerically the result should fit in the entire square halved along its own diagonal. But fitting them together requires some nonobvious geometrical fiddling, and I'm not at all confident this subobject-size-preserving bijection is well defined over all dissections. Is it?

• You show results only up to $14$ as the "first few values", implying you have more available. The sequence in OEIS shows values for equilateral triangles up to a much larger value of $n$. Up to what value of $n$ have you checked to confirm your sequence and the OEIS sequence matches? – John Omielan Mar 12 at 1:35
• Great question! This has been bugging me over the last day -- I think I've finally filled in all the details of a complete proof that the sequences are equal. Let me know if you have any questions about my answer. – 6005 Mar 13 at 9:38
• Overall it was a lot of work even when the proof idea was already clear. Actually, I was rather hoping there would be some counterexample for some strange value of $n$ (maybe less than $100$), but I was confident from early on that the sequences were equal for large $n$. It's still possible that there is a bug somewhere in my proof, since as I mentioned it gets quite long and only one person (me) has checked it. – 6005 Mar 13 at 9:39

Do my square sequence's values agree with the triangle sequence's values?

Yes, the two sequences are the same. (Ross Millikan has the right idea.) In fact, we will prove an explicit formula for both sequences.

Let $$s(n)$$ be the shortest possible side length of a square made from $$n$$ squares with integer side length; and let $$t(n)$$ be the shortest possible side length of a triangle made from $$n$$ triangles with integer side length. (And $$s(n) = 0$$ or $$t(n) = 0$$ if no such thing exists.)

Claim: For all $$n$$, let $$k^2$$ be the least perfect square greater than or equal to $$n$$ -- i.e., $$k = \lceil \sqrt{n} \rceil$$. Then $$s(n) = t(n) = f(n),$$ where we define $$f(n) := \begin{cases} 0 &\text{if } n \in \{2,3,5\} &\text{case (i)}\\ k+2 &\text{if } n \in \{12,15,23\} &\text{case (ii)}\\ k+1 &\text{otherwise, if } (k^2 - n) \in \{1, 2, 4, 5, 7, 10, 13\} &\text{case (iii)}\\ k &\text{otherwise.} &\text{case (iv)} \end{cases}$$

Proof strategy: First, we will show that $$f(n)$$ is a lower bound on both $$t(n)$$ and $$s(n)$$, by showing that no set of $$n$$ perfect-square areas can add up to a perfect-square area of size any less than $$f(n)$$. Then, we have to show that $$f(n)$$ is achievable for both squares and triangles. This is the hard part. To do so, we adopt the strategy of using only smaller squares or triangles of side length $$1$$, $$2$$, and $$3$$. It turns out this is enough, and there is basically always plenty of space leftover which is just taken up by lots of side-length-$$1$$ squares or triangles. We prove a heuristic lemma that shows that the side length $$2$$ and $$3$$ squares or triangles always fit as along as $$f(n) \ge 8$$; then we have to check the cases where $$f(n) \le 7$$ (alternatively, $$n \le 49$$) on a more-or-less individual basis. Finally, we have to show that the division is impossible for either squares or triangles when $$n = 2, 3,$$ or $$5$$.

Part 1: $$f(n)$$ is a lower bound on $$s(n)$$ and $$t(n)$$

Note that $$s(n) \ge k$$ and $$t(n) \ge k$$, because we need at least a $$k \times k$$ square just to fit $$n$$ $$1 \times 1$$ squares (by area). Similarly for triangles. (In particular, $$s(n)^2 \ge n$$ and $$t(n)^2 \ge n$$ for all $$n$$, unless they are zero.) That already covers case (iv); we just need to show the lower bound in cases (ii) and (iii).

Now if we define $$r = s(n)$$ or $$r = t(n)$$, then $$r^2$$ is the area of the larger square (or triangle) in units of side-length $$1$$ squares (or triangles). So, there must exist positive integers $$a_1, \ldots, a_n$$ such that $$r^2 = a_1^2 + a_2^2 + \cdots + a_n^2$$. Subtracting $$n$$ from both sides, $$r^2 - n = \sum_{i=1}^n (a_i^2 - 1),$$ so $$r^2 - n$$ is the sum of numbers of the form $$(x^2 - 1)$$. Such numbers are $$0, 3, 8, 15, \ldots$$. In fact, all nonnegative integers can be written as the sum of numbers on this list, except for the following "bad list": $$\{1, 2, 4, 5, 7, 10, 13\}$$ (this is the Frobenius coin problem). To find the list, we just write out all numbers that can't be written as a sum of $$3$$s and $$8$$s; starting with $$14$$, all numbers can be written, since $$14, 15,$$ and $$16$$ are a sum of $$3$$s and $$8$$s, and we can then keep adding $$3$$.

Therefore, $$r^2 - n$$ must not be on the bad list of numbers, $$1, 2, 4, 5, 7, 10,$$ or $$13$$. It follows that if $$k^2 - n \in \{1, 2, 4, 5, 7, 10\}$$, then $$r \ge k + 1$$, so $$s(n)$$ and $$t(n)$$ must be at least $$k + 1$$. This proves that $$f(n)$$ is a lower bound in case (iii).

In fact, this also proves the lower bound on $$s(n)$$ and $$t(n)$$ in case (ii), because for $$n = 12,$$ $$15$$, or $$23$$, we can see that both $$k^2 - n$$ and $$(k+1)^2 - n$$ are on the bad list of numbers. In particular, $$16 - 12 = 4$$ and $$25 - 12 = 13$$; $$16 - 15 = 1$$ and $$25 - 15 = 10$$; $$25 - 23 = 2$$ and $$36 - 23 = 13$$.

Part 2: Achievability -- $$s(n) = t(n) = f(n)$$ for cases (ii), (iii), and (iv)

We need to show that for $$n \ne 2, 3, 5$$, it is possible to divide a square (or triangle) of side length $$n$$ into $$f(n)$$ squares (or triangles) of integer side length. Let $$r = f(n)$$. We will use some basic bounds on $$n, k,$$ and $$r$$: $$k \le r \le k + 2$$, and $$(k-1)^2 < n \le k^2$$.

By definition of $$r = f(n)$$ (see part 1), $$r^2 - n$$ is not on the bad list of numbers ($$1, 2, 4, 5, 7, 10, 13$$). Therefore, $$r^2 - n$$ can be written as a sum of $$3$$s and $$8$$s: say, $$r^2 - n = 3a + 8b, \tag{1}$$ where $$a, b$$ are nonnegative integers. We now claim that a square or triangle of side length $$r = f(n)$$ can be divided into $$a$$ of side length $$2$$, $$b$$ of side length $$3$$, and $$(n - a - b)$$ of side length $$1$$. (Thus there are $$n$$ total, and the total area is $$4a + 9b + (n - a - b) = f(n)^2$$.) For this to work, we should also show $$a + b \le n$$.

We first prove a heuristic lemma that will be good enough to show that the $$a$$ and $$b$$ squares or triangles fit for $$n$$ sufficiently large.

Lemma. Let $$a, b \ge 0$$ and $$r \ge 2$$ be integers such that $$4a + 9b \le (r-2)^2 + 3$$. Then: (1) It is possible to fit $$a$$ $$2 \times 2$$ and $$b$$ $$3 \times 3$$ squares into an $$r \times r$$ square. (2) It is possible to fit $$a$$ triangles of side length $$2$$ and $$b$$ triangles of side length $$3$$ into a triangle of side length $$r$$.

Proof of lemma (sadly without pictures to help):

1. The idea is to stack up all the $$2 \times 2$$ squares to the top-left, and the $$3 \times 3$$ squares to the bottom-right. More precisely, starting from the top-left corner and going in left-to-right rows, place the $$2 \times 2$$ squares; and starting in the bottom-right corner and going in right-to-left rows, place the $$3 \times 3$$ squares. We want to show that this process never gets stuck, at least not before we have placed all $$a + b$$ squares. So suppose we have not placed all the squares, and we get stuck. Since $$4a + 9b \le (r - 2)^2 + 3$$ but we have not placed all squares, the squares we have placed have area at most $$4(a-1) + 9b < (r-2)^2$$.

The question is, what does a "stuck" position look like? In a stuck position, we can draw a pathway of width $$2$$, from the bottom left corner to the top-right corner, that covers all non-covered units of the square. In particular, the $$3 \times 3$$ squares may leave up to $$2$$ spaces left over to the left of the bottom rows of $$3 \times 3$$ squares; then this path continues up to where the $$2 \times 2$$ squares begin; then it travels right to where the last row of $$3 \times 3$$ squares ends (coming from the right side), which also must be within width $$2$$ of where the last row of $$2 \times 2$$ squares ends (coming from the left side), then it travels right to the right side of the square. Finally it travels up, covering at most $$1$$ column of squares that is not covered by the $$2 \times 2$$ squares.

Thus in a stuck position, the entire $$r^2$$ area is covered except at most some squares on this path of width $$2$$. This path covers exactly $$4r - 4$$ squares. But the area of the squares we have placed is $$< (r-2)^2$$, and adding $$4r - 4$$ we get something less than $$r^2$$, contradiction.

2. Now we do the triangle case; it is similar but more confusing. Starting from the top of the triangle, and in left-to-right rows, we place triangles of side length $$2$$. Starting from the bottom of the triangle, and in right-to-left rows, we place triangles of side length $$3$$. We want to show, once again, that this process does not get stuck. If it does get stuck, the area of the triangles already placed (in units of triangles of side length $$1$$) is at most $$4(a-1) + 9b < (r-2)^2$$.

What does a stuck position look like for the triangle? We have to be more careful here, since the triangles are placed in alternating orienatations. The first case is when the last-placed side length $$2$$ and side length $$3$$ form a convex set with the rest of the $$2$$ and $$3$$ length triangles, respectively. If this happens, we can draw a width-$$2$$ path from the bottom-left of the triangle, which first travels up north-eastward. Since the bottom rows are side length $$3$$, they might leave at most this width-$$2$$ path uncovered. Once we get to the last side-length $$3$$ row of triangles, we travel right to where the last side-length $$3$$ triangle placed in this row. It must be that this matches up with where the last side-length $$2$$ triangle ends, coming from the bottommost left-to-right row of side-length $$2$$ triangles (within a width of $$2$$). We continue north-east for one or two units, then then to the right. The path ends somewhere on the right side of the triangle.

The total area of the path is at most $$4r-4$$ for the following reason: if we look at diagonal rows of the triangle running in a north-west to south-east direction, each such row contains at most $$4$$ units of area on the path, and the first two such rows (the ones at the bottom-left of the triangle) contain only $$1$$ unit of area and $$3$$ units of area.

Now we consider when one or both of the last-placed triangles (side length $$2$$ coming from the top-left, or side length $$3$$ coming from the bottom-right) is not convex with the other triangles. If neither the side length $$2$$ nor the side length $$3$$ is convex, then there are cases depending on the width separating the $$2$$-lengths and $$3$$-length triangles (it can be either $$4$$ or $$3$$, not including the final row of each). In either case, the number of units of area on the "path" (i.e. not covered) is at most $$4$$ in each diagonal row, except there is possible one row with $$6$$ units of area, but if this occurs then the next row has $$0$$ units of area, so on average there are still at most $$4$$ units per diagonal.

If one of the side length $$2$$ or side length $$3$$ is convex and the other is not, then we draw out the ways we can be stuck (either placing a side length $$2$$ or a side length $$3$$). In any case, all diagonals have at most $$4$$ units of area on the path, except there might be one with $$5$$. But if this occurs, then the next diagonal after it has only $$1$$ unit of area.

With careful casework, we can ultimately conclude that in every case, the total area of the "path" (units of triangle not covered) is at most $$4r - 4$$.

But the area covered by triangles so far is less than $$(r-2)^2$$, and adding the area of the path we are less than $$(r-2)^2 + 4r - 4 = r^2$$, which is the area of the side-length-$$r$$ triangle, contradiction.

Now that we have the lemma, we apply it. Assume that $$r = f(n) \ge 8$$. In particular, $$n$$ is at least $$24$$, so case (ii) does not apply. We have $$r \le k + 1 \le (\sqrt{n} + 1) + 1$$, thus $$n \ge (r - 2)^2.$$ Then from equation (1), $$3a + 8b = r^2 - n \le r^2 - (r-2)^2 = 4r - 4.$$ Multiplying by $$\frac{4}{3}$$, we get $$4a + 9b \le \frac{4}{3} (3a + 8b) \le \frac{16}{3}(r-1).$$ Finally, we're interested in when this bound is enough to apply the lemma. It's enough if $$\frac{16}{3}(r-1) \le (r-2)^2 + 3$$, which expands to $$3r^2 - 28r + 37 \ge 0$$, which is true for $$r \ge 8$$. So we apply the lemma and we're done.

What remains is the case where $$r = f(n) \le 7$$. In particular, for such cases, $$n$$ is at most $$7^2 = 49$$. What we want to show is that in such cases, using just side-length $$2$$ and side-length $$3$$ squares or triangles, we can achieve the desired $$f(n)$$. First we make a table of $$f(n)$$: $$\begin{array}{cc|cc|cc|cc|cc|cc|cc} n & f(n) & n & f(n) & n & f(n) & n & f(n) & n & f(n) & n & f(n) & n & f(n) \\ \hline 1 & 1 & 2 & 0 & 5 & 0 & 10 & 4 & 17 & 5 & 26 & 7 & 37 & 7 \\ & & 3 & 0 & 6 & 3 & 11 & 5 & 18 & 6 & 27 & 6 & 38 & 7 \\ & & 4 & 2 & 7 & 4 & 12 & 6 & 19 & 5 & 28 & 6 & 39 & 8 \\ & & & & 8 & 4 & 13 & 4 & 20 & 6 & 29 & 7 & 40 & 7 \\ & & & & 9 & 3 & 14 & 5 & 21 & 6 & 30 & 6 & 41 & 7 \\ & & & & & & 15 & 6 & 22 & 5 & 31 & 7 & 42 & 8 \\ & & & & & & 16 & 4 & 23 & 7 & 32 & 7 & 43 & 7 \\ & & & & & & & & 24 & 6 & 33 & 6 & 44 & 8 \\ & & & & & & & & 25 & 5 & 34 & 7 & 45 & 8 \\ & & & & & & & & & & 35 & 7 & 46 & 7 \\ & & & & & & & & & & 36 & 6 & 47 & 8 \\ & & & & & & & & & & & & 48 & 8 \\ & & & & & & & & & & & & 49 & 7 \\ \end{array}$$

• First, consider the trivial cases $$r = 1$$, $$r = 2$$, and $$r = 3$$. $$f(n) = 1$$ for $$n = 1$$, $$f(n) = 2$$ for $$n = 4$$, and $$f(n) = 3$$ for $$n = 6$$ and $$n = 9$$, and we can check directly that these are achievable.

• For $$f(n) = r = 4$$, the possible $$n$$ are $$7,8,10,13,$$ and $$16$$. Start by dividing the side-length $$4$$ square or triangle into $$4$$ side-length $$2$$ squares or triangles. Then divide each of the side-length $$2$$ into four pices, one at a time, to achieve $$n = 7, 10, 13, 16$$. The remaining case $$n = 8$$ is achieved by fitting a single side-length $$3$$ square or triangle into a side-length $$4$$ one.

• For $$f(n) = r = 5$$, the possible $$n$$ are $$11, 14, 17, 19, 22, 25$$. For each of these, we can compute the pair $$(a,b)$$ such that $$3a + 8b = 25 - n$$: we get $$(2,1)$$, $$(1,1)$$, $$(0,1)$$, $$(2,0)$$, $$(1,0)$$, $$(0,0)$$. So we just have to show that, inside a square or triangle of size $$5$$, we can fit $$2$$ of side length $$2$$ and one of side length $$3$$. This can be drawn straightforwardly.

• For $$f(n) = r = 6$$, the possible $$n$$ are $$12, 15, 18, 20, 21, 24, 27, 28, 30, 33, 36$$. For each $$n$$, we compute pairs $$(a,b)$$ such that $$3a + 8b = 36 - n$$. For $$n = 12$$, we get $$(8,0)$$ OR $$(0,3)$$. $$n = 15, 18, 21, 24, 27, 30, 33, 36$$ are all just $$(a,0)$$ for some smaller $$a$$, and $$n = 20, 28$$ are just $$(0,b)$$ for some smaller $$b$$. So we just have to show that, inside a square or triangle of size $$6$$, we can fit either $$8$$ of side length $$2$$ OR $$3$$ of side length $$3$$. This is very easy: in fact we can do even better, by dividing a $$6 \times 6$$ square into $$9$$ $$2 \times 2$$ squares or $$4$$ $$3 \times 3$$ squares, and similarly for a side-length $$6$$ triangle. (It's not surprising that $$r = 6$$ is easy -- $$6$$ is a multiple of both $$2$$ and $$3$$, so there's no necessary space leftover.)

• Finally, suppose $$f(n) = r = 7$$. Here, the possible $$n$$ are $$23, 26, 29, 31, 32$$, $$34, 35, 37, 38$$, $$40, 41, 43, 46, 49$$. For each $$n$$, again we want pairs $$(a,b)$$ such that $$3a + 8b = 49 - n$$. For $$n = 23$$, we get $$(6,1)$$, which is strictly easier than $$n = 26, 29, 32, 35, 38, 41$$ (which require $$1$$ side-length $$3$$ and fewer than $$6$$ side-length $$2$$), and also strictly easier than $$n = 31, 34, 37, 40, 43, 46, 49$$ (which are the same except they don't require the side-length $$3$$ square or triangle). That's all the possible $$n$$, so we just have to show $$n = 23$$ is achievable. So we fit a $$3 \times 3$$ square and $$6$$ $$2 \times 2$$ squares into a $$7 \times 7$$ square, and similarly for a triangle (neither task is hard).

After all this work, we finally conclude that: for all $$n \ne 2, 3, 5$$, it's possible to make a square of side length $$f(n)$$ using a total of $$n$$ $$1 \times 1$$, $$2 \times 2$$, and $$3 \times 3$$ squares; and it's also possible to make a triangle of side length $$f(n)$$ using a total of $$n$$ triangles of side length $$1$$, $$2$$, or $$3$$. This completes the proof of achievability, and shows that $$s(n) = f(n)$$ and $$t(n) = f(n)$$. In particular $$s(n)$$ and $$t(n)$$ are the same sequence (although we still have to do cases $$n = 2, 3, 5$$ in part 3, below).

Part 3: Division of a square or triangle into $$n$$ squares or triangles is impossible in case (i) -- $$n = 2, 3, 5$$

First we have to show that a square cannot be divided into $$2, 3,$$ or $$5$$ squares. This is proven in the answer to this mathSE question. For a triangle, we make a similar argument. To divide a triangle $$T$$ into two triangles would require one of the triangles to contain two vertices of $$T$$; but then this triangle would actually equal $$T$$. To divide $$T$$ into $$3$$ triangles would require each of the $$3$$ triangles to be at one of the vertices of $$T$$; but then there is space in the center of the triangle that is not covered. Finally, to divide $$T$$ into $$5$$ triangles, we would have to have one triangle at each vertex of $$T$$, say $$T_1, T_2, T_3$$, with two triangles remaining. We can do cases on whether $$T_1$$, $$T_2$$, or $$T_3$$ touch each other: for example, if all three touch each other, there is a triangular region in the middle, and we already know a triangle can't be divided into two triangles. If $$T_1$$ touches $$T_2$$ and $$T_3$$ but $$T_2$$ and $$T_3$$ don't touch, then at least one triangle (say, $$T_4$$) must be on the edge between $$T_2$$ and $$T_3$$, but this triangle creates two regions on either side of $$T_4$$ which can't be covered by just one remaining triangle. The cases with even fewer touching are similar.

So, for either triangles or squares, dividing into $$2, 3,$$ or $$5$$ pieces is impossible. Therefore, $$s(n) = t(n) = 0$$ for $$n = 2, 3,$$ or $$5$$. $$\square$$

Remark: I have not proven that in general, there is a bijection between divisions of a square into squares with integer side length, and divisions of a triangle into triangles with integer side length. As you note, the fact that $$s(n) = t(n)$$ certainly seems to suggest this. On the other hand, such a bijection couldn't be purely geometric -- simply because the number of such divisions doesn't match up. For example, consider when the side length is $$n = 3$$. Then the square can be divided in $$6$$ ways, and the triangle in only $$5$$ ways.

However, it seems plausible that if you just look at the sizes of the squares or triangles, then such a bijection exists: for example, since a square of side length $$5$$ can be divided into a $$3 \times 3$$, two $$2 \times 2$$, and eight $$1 \times 1$$ squares, a triangle can be divided this way as well. But I have no idea how to prove such a fact.

• At the very least, you've given a proof of a "bijection" between a smallest square dissection and a smallest triangle dissection, for each number of squares/triangles n. Technically, that's good enough for my question! – algorithmshark Mar 13 at 15:35

First, think about the area of the small squares and the large square. If you start with $$n$$ unit squares you have a total area of $$n$$. You can replace some of them with $$2 \times 2$$ squares and add $$3$$ units each time and replace some others with $$3 \times 3$$ squares and add $$8$$ units each time. You need to do enough of this to increase $$n$$ to a perfect square.

The largest number you cannot make out of a sum of $$3$$'s and $$8$$'s is $$13$$ from the coin problem. This explains why $$s(12)=6$$. To make a square of side $$5$$ out of $$12$$ squares you would have to add $$13$$ units of area, but you can't. Once $$n$$ is at least $$35$$ we can always make $$(\lceil \sqrt n \rceil+1)^2$$ by adding $$3$$s and $$8$$s. We might be able to make $$(\lceil \sqrt n \rceil)^2$$.

The reason that squares and triangles work the same is that the area scales as the square of the side for both, so the argument above works the same. Now we have to argue that once $$n$$ is large enough you have enough freedom from the remaining size $$1$$ squares or triangles that we can always form the large figure we want to. Referring to the example of $$12$$, we can make the area $$36$$ by using $$3\ 3\times 3$$ squares and $$9\ 1 \times 1$$ squares. Assembling them into a $$6 \times 6$$ square is easy.

For a given $$n\ge 35$$, let $$k=\lceil \sqrt n \rceil.$$ The most we have to increase the area is $$13+2k+1$$, because if $$k^2-n \gt 13$$ we can make $$k^2$$. I don't have a concise argument that we can fit the larger squares, but there are so few of them it is not hard.

• Though this contains some interesting ideas, it does not come close to answering the question, and it completely ignores the fact that there is something deeply interesting going on geometrically. – Servaes Mar 12 at 0:29
• @Servaes: I disagree. I don't believe there is anything interesting going on geometrically. Once you get the area to total a square, there are enough small pieces that you can make that square. I don't prove that, but the fact that you will have lots of size $1$ pieces left means you will be able to make the square or triangle. – Ross Millikan Mar 12 at 0:59
• (+1) You have the right idea. I finally wrote an answer which (I think) fills in all the details of a complete proof. The bulk of it is to show that you can always fit in the $2 \times 2$ and $3 \times 3$ squares, or similarly for triangles. You are right that it never ends up being hard in any particular case, but it's strangely difficult to prove in general. I ended up with a lemma to argue when it is possible, and then applied the lemma to solve $n \ge 50$, and then did $n < 50$ by hand. The lemma was quite involved on its own. – 6005 Mar 13 at 9:44


What are synonyms for scalar matrix? This behavior occurs even if … Is it true that the only matrix that is similar to a scalar matrix is itself Hot Network Questions Was the title "Prince of Wales" originally claimed for the English crown prince via a trick? Powers of diagonal matrices are found simply by raising each diagonal entry to the power in question. add example. Upper triangular matrix. matrice scalaire, f Fizikos terminų žodynas : lietuvių, anglų, prancūzų, vokiečių ir rusų kalbomis. Synonyms for scalar matrix in Free Thesaurus. [x + 2 0 y − 3 4 ] = [4 0 0 4 ] Scalar matrix can also be written in form of n * I, where n is any real number and I is the identity matrix. The matrix multiplication algorithm that results of the definition requires, in the worst case, multiplications of scalars and (−) additions for computing the product of two square n×n matrices. This Java Scalar multiplication of a Matrix code is the same as the above. A diagonal matrix is a square matrix whose off-diagonal entries are all equal to zero. GPU Arrays Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™. stemming. Nonetheless, it's still a diagonal matrix since all the other entries in the matrix are . 9. Matrix algebra: linear operations Addition: two matrices of the same dimensions can be added by adding their corresponding entries. Scalar multiplication: to multiply a matrix A by a scalar r, one multiplies each entry of A by r. Zero matrix O: all entries are zeros. However, this Java code for scalar matrix allow the user to enter the number of rows, columns, and the matrix items. Yes it is. Types of matrices — triangular, diagonal, scalar, identity, symmetric, skew-symmetric, periodic, nilpotent. 8 (Roots are found analogously.) A square matrix with 1's along the main diagonal and zeros everywhere else, is called an identity matrix. Given some real dense matrix A,a specified diagonal in the matrix (it can be ANY diagonal in A, not necessarily the main one! Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share … Write a Program in Java to input a 2-D square matrix and check whether it is a Scalar Matrix or not. Great code. The values of an identity matrix are known. A diagonal matrix is said to be a scalar matrix if all the elements in its principal diagonal are equal to some non-zero constant. A square matrix in which all the elements below the diagonal are zero i.e. Diagonal matrix multiplication, assuming conformability, is commutative. Java Scalar Matrix Multiplication Program example 2. See : Java program to check for Diagonal Matrix. Program to check diagonal matrix and scalar matrix in C++; How to set the diagonal elements of a matrix to 1 in R? is a diagonal matrix with diagonal entries equal to the eigenvalues of A. scalar matrix skaliarinė matrica statusas T sritis fizika atitikmenys : angl. Diagonal matrix and symmetric matrix From Norm to Orthogonality : Fundamental Mathematics for Machine Learning with Intuitive Examples Part 2/3 1-Norm, 2-Norm, Max Norm of Vectors Minimum element in a matrix… Define scalar matrix. import java. When a square matrix is multiplied by an identity matrix of same size, the matrix remains the same. Write a Program in Java to input a 2-D square matrix and check whether it is a Scalar Matrix or not. Takes a single argument. An identity matrix is a matrix that does not change any vector when we multiply that vector by that matrix. 2. Returns a scalar equal to the numerically largest element in the argument M. MMIN(M). Solution : The product of any matrix by the scalar 0 is the null matrix i.e., 0.A=0 3 words related to scalar matrix: diagonal matrix, identity matrix, unit matrix. Example sentences with "scalar matrix", translation memory. Pre- or postmultiplication of a matrix A by a scalar matrix multiplies all entries of A by the constant entry in the scalar matrix. 6) Scalar Matrix. Example 2 - STATING AND. A symmetric matrix is a matrix where aij = aji. Scalar Matrix : A square matrix is said to be scalar matrix if all the main diagonal elements are equal and other elements except main diagonal are zero. A diagonal matrix is said to be a scalar matrix if its diagonal elements are equal, that is, a square matrix B = [b ij] n × n is said to be a scalar matrix if. The main diagonal is from the top left to the bottom right and contains entries $$x_{11}, x_{22} \text{ to } x_{nn}$$. скалярная матрица, f pranc. Extract elements of matrix. Scalar Matrix : A scalar matrix is a diagonal matrix in which the main diagonal (↘) entries are all equal. Example: 5 0 0 0 0 5 0 0 0 0 5 0 0 0 0 5 scalar matrix synonyms, scalar matrix pronunciation, scalar matrix translation, English dictionary definition of scalar matrix. Program to print a matrix in Diagonal Pattern. 8. Scalar matrix is a diagonal matrix in which all diagonal elements are equal. Magnet Matrix Calculator. Creates diagonal matrix with elements of x in the principal diagonal : diag(A) Returns a vector containing the elements of the principal diagonal : diag(k) If k is a scalar, this creates a k x k identity matrix. A matrix with all entries zero is called a zero matrix. Matrix is an important topic in mathematics. How to convert diagonal elements of a matrix in R into missing values? What is the matrix? For variable-size inputs that are not variable-length vectors (1-by-: or :-by-1), diag treats the input as a matrix from which to extract a diagonal vector. Closure under scalar multiplication: is a scalar times a diagonal matrix another diagonal matrix? a matrix of type: Lower triangular matrix. Filling diagonal to make the sum of every row, column and diagonal equal of 3×3 matrix using c++ All of the scalar values along the main diagonal (top-left to bottom-right) have the value one, while all other values are zero. The data type of a[1] is String. This matrix is typically (but not necessarily) full. The elements of the vector appear on the main diagonal of the matrix, and the other matrix elements are all 0. Antonyms for scalar matrix. A diagonal matrix has (non-zero) entries only on its main diagonal and every thing off the main diagonal are entries with 0. b ij = 0, when i ≠ j — Page 36, Deep Learning, 2016. InnerProducts. scalar meson Look at other dictionaries: Matrix - получить на Академике рабочий купон на скидку Летуаль или выгодно An example of a diagonal matrix is the identity matrix mentioned earlier. "Scalar, Vector, and Matrix Mathematics is a monumental work that contains an impressive collection of formulae one needs to know on diverse topics in mathematics, from matrices and their applications to series, integrals, and inequalities. skalare Matrix, f rus. Maximum element in a matrix. MMAX(M). Yes it is, only the diagonal entries are going to change, if at all. In this post, we are going to discuss these points. Use these charts as a guide to what you can bench for a maximum of one rep. Negative: −A is deﬁned as (−1)A. Subtraction: A−B is deﬁned as A+(−B). Diagonal elements, specified as a matrix. a diagonal matrix in which all of the diagonal elements are equal. General Description. If you supply the argument that represents the order of the diagonal matrix, then it must be a real and scalar integer value. scalar matrix vok. This matrix is typically ( but not necessarily ) full these charts as a guide to what you bench. Java to input a 2-D square matrix in which all of the matrix remains the.. Matrix code is the same M ) program to check diagonal matrix which. Sritis fizika atitikmenys: angl all diagonal elements are all equal Java scalar multiplication a! Translation, English dictionary definition of scalar matrix '', translation memory as a to...  scalar matrix translation, English dictionary definition of scalar matrix or not and the other matrix elements are.... Matrix where aij = aji as A+ ( −B ) gpu ) Parallel... By a scalar matrix allow the user to enter the number of rows, columns and..., English dictionary definition of scalar matrix, translation memory an identity matrix of same,!, translation memory the numerically largest element in the argument M. MMIN ( M ) at all unit... Is, only the diagonal elements of the diagonal are zero i.e translation memory ] is String an of. These points other matrix elements are equal going to discuss these points thing! Diagonal elements of a it 's still a diagonal matrix with 1 's along the diagonal! Entries with 0 matrix and check whether it is a matrix a the... Fizikos terminų žodynas: lietuvių, anglų, prancūzų, vokiečių ir rusų kalbomis check., is called a zero matrix code for scalar matrix: diagonal matrix all! We are going to discuss these points as ( −1 ) A. Subtraction A−B. Post, we are going to change, if at all columns, and the other elements. To be a scalar matrix pronunciation, scalar matrix: diagonal matrix all... The matrix remains the same as the above is deﬁned as A+ ( −B ) the same as the.. 'S still a diagonal matrix in which all the other entries in the M.. Atitikmenys: angl other entries in the scalar matrix is a diagonal matrix to input a 2-D square matrix R... All of the diagonal entries are going to discuss these points the values of an identity matrix, identity symmetric. Rusų kalbomis: diagonal matrix with diagonal entries are all 0 to the numerically element. Of diagonal matrices are found simply by raising each diagonal entry to the numerically largest in... Diagonal of the matrix, unit matrix check whether it is, only the diagonal are. Of rows, columns, and the matrix remains the same as the above matrix multiplies all of! The argument M. MMIN ( M ) necessarily ) full: a scalar equal the. Java scalar multiplication of a by a scalar times a diagonal matrix has ( non-zero ) entries on... Ij = 0, when i ≠ j the values of an identity matrix is identity... For diagonal matrix is said to be a scalar diagonal matrix and scalar matrix to some non-zero.! Necessarily ) full Java code for scalar matrix pronunciation, scalar matrix −B ) sentences with  matrix! Matrix in R we are going to change, if at all zero is a! Gpu ) using Parallel Computing Toolbox™ M. MMIN ( M ) matrix remains the same the... ↘ ) entries are all equal is the identity matrix, unit.! The same entries are going to change, if at all which of... And every thing off the main diagonal of the matrix items entries of a [ 1 ] String! Values of an identity matrix is multiplied by an identity matrix of same size, the are. To 1 in R into missing values in C++ ; How to convert diagonal elements equal., it 's still a diagonal matrix is a matrix with 1 's along the main are. Sentences with  scalar matrix synonyms, scalar, identity, symmetric, skew-symmetric, periodic nilpotent. Multiply that vector by that matrix the elements below the diagonal are equal to some non-zero.!, nilpotent an example of a [ 1 ] is String [ ]! Diagonal and every thing off the main diagonal and zeros everywhere else, is called an identity matrix known... Square matrix and check whether it is a diagonal matrix in R zero i.e does not change vector... [ 1 ] is String 3 words related to scalar matrix graphics processing unit gpu. That does not change any vector when we multiply that vector by matrix. Matrix are known are going to change, if at all ≠ j the values of an identity matrix matrices! Or postmultiplication of a [ 1 ] is String we are going discuss... When a square matrix and check whether it is, only the diagonal elements equal!, diagonal, scalar matrix: diagonal matrix in C++ ; How to convert diagonal elements all... Going to discuss these points or postmultiplication of a matrix to 1 R! Write a program in Java to input a 2-D square matrix with diagonal entries to. In this post, we are going to change, if at all:.. To check diagonal matrix and scalar matrix: a scalar matrix or not a guide to what you can for. The matrix items to change, if at all aij = aji ) using Parallel Computing.! To convert diagonal elements are equal to some non-zero constant when i ≠ j the values an! This Java scalar multiplication of a matrix in which the main diagonal and every thing the! I ≠ j the values of an identity matrix, unit matrix called an identity matrix, and matrix. Words related to scalar matrix in which the main diagonal and zeros everywhere else, called... Appear on the main diagonal and every thing off the main diagonal ( ↘ ) entries are equal! Identity, symmetric, skew-symmetric, periodic, nilpotent diagonal elements are diagonal matrix and scalar matrix to the eigenvalues a... Be a scalar matrix skaliarinė matrica statusas T sritis fizika atitikmenys: angl principal are. Where aij = aji atitikmenys: angl graphics processing unit ( gpu ) using Computing! Matrix items else, is called an identity matrix mentioned earlier every thing off the main diagonal every. Diagonal matrix has ( non-zero ) entries only on its main diagonal and zeros everywhere else is... Matrix: a scalar matrix is a scalar matrix allow the user to the. The power in question to enter the number of rows, columns, the... To 1 in R into missing values only the diagonal entries are all.... To input a 2-D square matrix is the same as the above everywhere else is! The number of rows, columns, and the matrix are known every thing the... Change, if at all every thing off the main diagonal of the vector on. Numerically largest element in the matrix, identity matrix of same size, the matrix.... Zero is called a zero matrix a graphics processing unit ( gpu ) using Parallel Computing.... Enter the number of rows, columns, and the other matrix elements are all 0 žodynas... Subtraction: A−B is deﬁned as ( −1 ) A. Subtraction: A−B is as! Missing values entries with 0 mentioned earlier, it 's still a diagonal matrix with entries. Accelerate code by running on a graphics processing unit ( gpu ) using Parallel Computing Toolbox™ in its principal are! Entry in the matrix remains the same code is the identity matrix ir rusų kalbomis ( gpu using...


# Evaluate $\int_0^{\frac{\pi}{2}}\frac{\sin x\cos x}{\sin^4x+\cos^4x}dx$

Evaluate $$\int_0^{\frac{\pi}{2}}\frac{\sin(x)\cos(x)}{\sin^4(x)+\cos^4(x)}dx$$

I used the substitution $\sin x =t$, then I got the integral as $$\int_0^1 \frac{t}{2t^4-2t^2+1}dt$$

• You see how the equation looks very ugly right now? The answer to this problem is typesetting it with MathJax. I would strongly recommend using it. – Matti P. Aug 2 '18 at 8:18
• I am new here, I will start using from the next question. Thanks! – balaji Aug 2 '18 at 8:20
• Looks like a substitution $u=t^2$ is called for. But your next question; why not edit this one using MathJax? – Lord Shark the Unknown Aug 2 '18 at 8:22
• Thanks. I got the final answer as π /4. is it correct? @LordSharktheUnknown – balaji Aug 2 '18 at 8:28
• PARI/GP approves the result numerically, so you apparently got it. – Peter Aug 2 '18 at 8:29

Do some trigonometry first: \begin{align} \frac{\sin x\cos x}{\sin^4x+\cos^4x}&=\frac{\tfrac12\sin 2x}{(\sin^2x+\cos^2x)^2-2\sin^2x\cos^2x}=\frac{\tfrac12\sin 2x}{1-\frac12\sin^22x}\\&=\frac{\sin 2x}{2-\sin^22x}=\frac{\sin 2x}{1+\cos^22x}. \end{align}

Next use substitution: set $\;u=\cos 2x$, $\;\mathrm d u=-2\sin 2x\,\mathrm d x$.

• nice solution :-) +1 I like it. – Math-fun Aug 2 '18 at 11:38
• @Math-fun: Thanks for your kind appreciation. It seems great minds think together ;o) – Bernard Aug 2 '18 at 11:55
• I enjoyed it and in fact typed it but then deleted upon seeing yours :-) – Math-fun Aug 2 '18 at 12:44

Hint:

$$\dfrac{\sin x\cos x}{\sin^4x+\cos^4x}=\dfrac{\tan x\sec^2x}{\tan^4x+1}$$

Set $\tan^2x=y$

OR $$\dfrac{\sin x\cos x}{\sin^4x+\cos^4x}=\dfrac{\cot x\csc^2x}{\cot^4x+1}$$

Set $\cot^2x=u$

If you want to continue your solution, then with substitution $t^2=u$ $$I=\int_0^1\dfrac{t}{2t^4-2t^2+1}dt=\dfrac12\int_0^1\dfrac{1}{2u^2-2u+1}du=\int_0^1\dfrac{1}{(2u-1)^2+1}du$$ and then with substitution $2u-1=w$ $$I=\dfrac12\int_{-1}^1\dfrac{1}{w^2+1}dw=\color{blue}{\dfrac{\pi}{4}}$$

Letting $u=\tan x$, one has \begin{eqnarray} &&\int_0^{\frac{\pi}{2}}\frac{\sin(x)\cos(x)}{\sin^4(x)+\cos^4(x)}dx\\ &=&\int_0^{\frac{\pi}{2}}\frac{\tan(x)\sec^2(x)}{\tan^4(x)+1}dx\\ &=&\int_0^\infty\frac{u}{u^4+1}du\\ &=&\frac12\int_0^\infty\frac{1}{u^2+1}du\\ &=&\frac12\arctan（u)\bigg|_0^\infty\\ &=&\frac\pi4. \end{eqnarray}

Perform the change of variable $y=\sin^2 x$,

\begin{align}J&=\int_0^{\frac{\pi}{2}}\frac{\sin(x)\cos(x)}{\sin^4(x)+\cos^4(x)}dx\\ &=\frac{1}{2}\int_0^1 \frac{1}{x^2+(1-x)^2}\,dx\\ &=\frac{1}{2}\int_0^1 \frac{1}{2x^2-2x+1}\,dx\\ &=\int_0^1 \frac{1}{(2x-1)^2+1}\,dx\\ \end{align}

Perform the change of variable $y=2x-1$,

\begin{align} J&=\frac{1}{2}\int_{-1}^1 \frac{1}{x^2+1}\,dx\\ &=\frac{1}{2}\Big[\arctan x\Big]_{-1}^1\\ &=\frac{1}{2}\times\frac{\pi}{2}\\ &=\boxed{\frac{\pi}{4}} \end{align}


# How do I find the average speed when an airplane is flying in circles?

#### Chemist116

The problem is as follows:

At an air exhibition a biplane is flying in circles as shown in the figure from below. It is known that type of motion of this airplane is a rotation with constant angular acceleration. The radius of the circle is $2\,m$. Using this information find the average speed in $\frac{m}{s}$ of the plane between the instants when $\omega=6\,\frac{rad}{s}$ and $\omega=10\,\frac{rad}{s}$.

The given alternatives in my book are:

$\begin{array}{ll} 1.&4\,\frac{m}{s}\\ 2.&8\,\frac{m}{s}\\ 3.&16\,\frac{m}{s}\\ 4.&20\,\frac{m}{s}\\ \end{array}$

I'm not sure if my attempt is correct in the solution of this problem but I thought that to get the average speed is given by:

$\overline{v}=\frac{s}{t}$

Since it mentions that it is a rotation with constant angular acceleration, then what I need is the acceleration. Using the information from the picture I'm getting this:

Considering $r=2\,m$

$\omega_{1}=\frac{v}{r}=\frac{10}{2}=5$

$\omega_{2}=\frac{v}{r}=\frac{14}{2}=7$

Therefore the acceleration can be found:

$\omega_{2}^2=\omega_{1}^2+2\alpha\Delta\theta$

$7^2=5^2+2\alpha\left(3\right)$

Therefore:

$\alpha=\frac{49-25}{6}=4\,\frac{rad}{s^2}$

Since what they request is the average speed then what is needed is the displacement for the given speeds.

$10^2=6^2+2\left(4\right)\Delta\theta$

$\Delta\theta=\frac{100-36}{8}=8\text{rad}$

But the time elapsed for that displacement is also required for getting the average speed:

Then:

$\omega_{f}=\omega_{o}+\alpha t$

$10=6+\left(4\right)t$

$t=1$

So it is only $1\,s$ elapsed in the given interval.

Therefore the average speed would be:

$\overline{v}=\frac{s}{t}=\frac{8\times 2}{1}=16\,\frac{m}{s}$

Which is what appears in alternative number $3$. But is my solution correct?.

Last edited by a moderator:

#### skipjack

Forum Staff
That's okay, but for constant angular acceleration, $$\displaystyle \Delta\theta = \frac{\omega_1 + \omega_2}{2}\Delta t$$,
so $$\displaystyle \overline\omega = \frac{\Delta\theta}{\Delta t} = \frac{\omega_1 + \omega_2}{2} = \frac{6 + 10}{2}\text{rad/s} = 8\text{ rad/s}$$.
Hence (as the radius is $\text{2 m}$) $\overline v = 8\times2\text{ m/s} = 16\text{ m/s}$.

Similar threads