Compare commits
No commits in common. "569c773de6ec131f7920d97cd5e2a03cb1427a23" and "bf024cc4e6753b6325a9d29fc748861b60e0423c" have entirely different histories.
569c773de6
...
bf024cc4e6
1
.obsidian/app.json
vendored
1
.obsidian/app.json
vendored
@ -2,7 +2,6 @@
|
||||
"vimMode": true,
|
||||
"promptDelete": false,
|
||||
"pdfExportSettings": {
|
||||
"includeName": true,
|
||||
"pageSize": "Letter",
|
||||
"landscape": false,
|
||||
"margin": "0",
|
||||
|
@ -1,41 +0,0 @@
|
||||
# Trigonometric Identities
|
||||
|
||||
All of the following only apply when the denominator is not equal to zero.
|
||||
|
||||
$$ tan \theta = \frac{y}{x} $$
|
||||
Because the following are inverses of their counterparts, you only need to remember the equivalents for $sin$, $cos$, and $tan$, then just find the inverse by taking $1/v$.
|
||||
|
||||
| Base Identity | Inverse Identity | Alternate Identities | Alternate Inverse Identities |
|
||||
| ----------------------------- | ------------------------------ | --------------------------------------------- | --------------------------------------------------------------------- |
|
||||
| $$ sin\theta = y $$ | $$ csc\theta = \frac{1}{y} $$ | | $$ csc\theta = \frac{1}{sin\theta} $$ |
|
||||
| $$ cos\theta = x $$ | $$ sec \theta = \frac{1}{x} $$ | | $$ sec\theta = \frac{1}{cos\theta} $$ |
|
||||
| $$ tan\theta = \frac{y}{x} $$ | $$ cot\theta = \frac{x}{y} $$ | $$ tan\theta = \frac{sin\theta}{cos\theta} $$ | $$ cot\theta = \frac{1}{tan\theta} = \frac{cos\theta}{sin{\theta}} $$ |
|
||||
|
||||
$$ cot \theta = \frac{x}{y} $$
|
||||
$$ sec\theta = \frac{1}{cos\theta}$$
|
||||
$$ csc\theta = \frac{1}{sin\theta}$$
|
||||
# Pythagorean Identities
|
||||
The Pythagorean identity expresses the Pythagorean theorem in terms of trigonometric functions. It's a basic relation between the sine and cosine functions.
|
||||
$$ sin^2 \theta + cos^2 \theta = 1 $$
|
||||
There are more forms that are useful, but they can be derived from the above formula:
|
||||
$$ 1 + tan^2\theta = sec^2\theta $$
|
||||
$$ cot^2 \theta + 1 = csc^2\theta $$
|
||||
# Even and Odd Identities
|
||||
- A function is even if $f(-x) = f(x)$.
|
||||
- A function is odd if $f(-x) = -f(x)$
|
||||
- Cosine and secant are **even**
|
||||
- Sine, tangent, cosecant, and cotangent are **odd**.
|
||||
## Examples
|
||||
### Even and Odd Functions
|
||||
> If $cot\theta = -\sqrt{3}$, what is $cot(-\theta)$?
|
||||
|
||||
$cot$ is an odd function, and so $cot(-\theta) = \sqrt{3}$
|
||||
### Simplifying Using Identities
|
||||
> Simplify $\frac{sin\theta}{cos\theta}$
|
||||
|
||||
1. The above equation can be split into two components
|
||||
$$ \frac{sin\theta}{cos\theta} = \frac{sin\theta}{1} * \frac{1}{csc\theta} $$
|
||||
2. Referring to the list of trig identities, we know that $\frac{1}{csc\theta}$ is equal to $sin\theta$.
|
||||
$$ \frac{sin\theta}{1} * \frac{1}{csc\theta} = sin\theta * sin\theta $$
|
||||
3. Simplifying further, we get:
|
||||
$$ sin^2\theta $$
|
@ -26,6 +26,19 @@ Finding a reference angle:
|
||||
| 2 | $180\degree - \theta$ |
|
||||
| 3 | $\theta - 180\degree$ |
|
||||
| 4 | $360\degree - \theta$ |
|
||||
## Other Trigonometric Functions
|
||||
All of the following only apply when the denominator is not equal to zero.
|
||||
|
||||
$$ tan \theta = \frac{y}{x} $$
|
||||
Because the following are inverses of their counterparts, you only need to remember the equivalents for $sin$, $cos$, and $tan$, then just find the inverse by taking $1/v$.
|
||||
$$ sec \theta = \frac{1}{x} $$
|
||||
$$ csc = \frac{1}{y} $$
|
||||
$$ cot \theta = \frac{x}{y} $$
|
||||
|
||||
## The Pythagorean Identity
|
||||
The Pythagorean identity expresses the Pythagorean theorem in terms of trigonometric functions. It's a basic relation between the sine and cosine functions.
|
||||
$$ sin^2 \theta + cos^2 \theta = 1 $$
|
||||
|
||||
# Definitions
|
||||
|
||||
| Term | Description |
|
||||
|
@ -1,103 +0,0 @@
|
||||
> 2. The following program fragments illustrate the logical operators. Show the output produced by each, assuming that `i`, `j`, and `k` are `int` variables.
|
||||
|
||||
a. `i = 10; j = 5;`
|
||||
```c
|
||||
printf("%d", !i < j);
|
||||
|
||||
// Expected output: `1`, because `!i` evaluates to 0, and 0 is less than 5, so that expression evaluates to true, or 1.
|
||||
```
|
||||
|
||||
b. `i = 2; j = 1;`
|
||||
```c
|
||||
printf("%d", !!i + !j);
|
||||
|
||||
// Expected output: `1`, because !!2 evaluates to 1, and !j evaluates to 0
|
||||
```
|
||||
|
||||
c. `i = 5; j = 0; k = -5;`
|
||||
```c
|
||||
printf("%d", i && j || k);
|
||||
|
||||
// Expected output: `1`, because i && j should evaluate to 0, but `0 || 1` should evalulate to true.
|
||||
```
|
||||
|
||||
d. `i = 1; j = 2; k = 3;`
|
||||
```c
|
||||
printf("%d", i < j || k);
|
||||
|
||||
// Expected output: `1`
|
||||
```
|
||||
|
||||
> 4. Write a single expression whose value is either `-1`, `0`, or `1` depending on whether `i` is less than, equal to, or greater than `j`, respectively.
|
||||
|
||||
```c
|
||||
/*
|
||||
If i < j, the output should be -1.
|
||||
If i == j, the output should be zero
|
||||
If i > j, the output should be 1.
|
||||
*/
|
||||
(i > j) - (i < j)
|
||||
```
|
||||
|
||||
> 6. Is the following `if` statement legal?
|
||||
```c
|
||||
if (n == 1-10)
|
||||
printf("n is between 1 and 10\n");
|
||||
```
|
||||
|
||||
Yes the statement is *legal*, but it does not produce the intended effect. It would not produce an output when `n = 5`, because `1-10` evaluates to `-9`, and `-9 != 5`.
|
||||
|
||||
> 10. What output does the following program fragment produce? (Assume that `i` is an integer variable.)
|
||||
```c
|
||||
int i = 1;
|
||||
switch (i % 3) {
|
||||
case 0: printf("zero");
|
||||
case 1: printf("one");
|
||||
case 2: printf("two");
|
||||
}
|
||||
```
|
||||
|
||||
The program would print `onetwo` because each case is missing a `break` statement.
|
||||
|
||||
> 11. The following table shows the telephone area codes in the state of Georgia along with the largest city in each area:
|
||||
|
||||
| Area code | Major city |
|
||||
| --------- | ---------- |
|
||||
| 229 | Albany |
|
||||
| 404 | Atlanta |
|
||||
| 470 | Atlanta |
|
||||
| 478 | Macon |
|
||||
| 678 | Atlanta |
|
||||
| 706 | Columbus |
|
||||
| 762 | Columbus |
|
||||
| 770 | Atlanta |
|
||||
| 912 | Savannah |
|
||||
> Write a switch statement whose controlling expression is the variable `area_code`. If the value of `area_code` is not in the table, the `switch` statement will print the corresponding city name. Otherwise, the `switch` statement will display the message `"Area code not recognized."` Use the techniques discussed in section 5.3 to make the `switch` as simple as possible.
|
||||
```c
|
||||
int area_code;
|
||||
|
||||
switch (area_code) {
|
||||
case 404:
|
||||
case 470:
|
||||
case 678:
|
||||
case 770:
|
||||
printf("Atlanta");
|
||||
break;
|
||||
case 706:
|
||||
case 762:
|
||||
printf("Columbus");
|
||||
break;
|
||||
case 229:
|
||||
printf("Albany");
|
||||
break;
|
||||
case 478:
|
||||
printf("Macon");
|
||||
break;
|
||||
case 912:
|
||||
printf("Savannah");
|
||||
break;
|
||||
default:
|
||||
printf("Area code not recognized.");
|
||||
break;
|
||||
}
|
||||
```
|
6
education/software development/ECE1400/Chapter.md
Normal file
6
education/software development/ECE1400/Chapter.md
Normal file
@ -0,0 +1,6 @@
|
||||
> 2. The following program fragments illustrate the logical operators. Show the output produced by each, assuming that `i`, `j`, and `k` are `int` variables.
|
||||
|
||||
a. `i = 10; j = 5;`
|
||||
```
|
||||
printf("%d", !i < j);
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user