This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Documentation

Documents Page

This page is for documents.

1 - Formatting Tips

1.1 - Formatting Tips

despription: A short lead description about this content page. Text here can also be bold or italic and can even be split over multiple paragraphs.

This is a placeholder page that shows you how to use this template site.

Text can be bold, italic, or strikethrough. Links should be blue with no underlines (unless hovered over).

Blockquotes should be a lighter gray with a border along the left side in the secondary color.

Header 2 (Header 1 is for title.)

This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

Header 3

This is a code block following a header.

Header 4

  • This is an unordered list following a header.
  • This is an unordered list following a header.
  • This is an unordered list following a header.
  1. This is an ordered list following a header.
  2. This is an ordered list following a header.
  3. This is an ordered list following a header.
Header 5

And an unordered task list:

  • Create a sample markdown document
  • Add task lists to it
  • Take a vacation

And a nested list:

  • Jackson 5
    • Michael
    • Tito
    • Jackie
    • Marlon
    • Jermaine
  • TMNT
    • Leonardo
    • Michelangelo
    • Donatello
    • Raphael
Header 6
What Follows
A table A header
A table A header
A table A header

There’s a horizontal rule above and below this.


Definition lists can be used with Markdown syntax. Definition terms are bold.

Name
Godzilla
Born
1952
Birthplace
Japan
Color
Green

Tables should have bold headings and alternating shaded rows.

Artist Album Year
Michael Jackson Thriller 1982
Prince Purple Rain 1984
Beastie Boys License to Ill 1986

If a table is too wide, it should scroll horizontally.

Artist Album Year Label Awards Songs
Michael Jackson Thriller 1982 Epic Records Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical Wanna Be Startin’ Somethin’, Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life
Prince Purple Rain 1984 Warner Brothers Records Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal Let’s Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I’m a Star, Purple Rain
Beastie Boys License to Ill 1986 Mercury Records noawardsbutthistablecelliswide Rhymin & Stealin, The New Style, She’s Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill

Code snippets like var foo = "bar"; can be shown inline. Also, this should vertically align with this and this.

Code can also be shown in a block element.

foo := "bar";
bar := "foo";

Code can also use syntax highlighting.

func main() {
  input := `var foo = "bar";`

  lexer := lexers.Get("javascript")
  iterator, _ := lexer.Tokenise(nil, input)
  style := styles.Get("github")
  formatter := html.New(html.WithLineNumbers())

  var buff bytes.Buffer
  formatter.Format(&buff, style, iterator)

  fmt.Println(buff.String())
}
Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this.

Inline code inside table cells should still be distinguishable.

Language Code
Javascript var foo = "bar";
Ruby foo = "bar"{

Small images should be shown at their actual size.

Large images should always scale down and fit in the content container.

Components

Alerts

Including images

Here’s an image (featured-sunset-get.png) that includes a byline and a caption.

Fetch and scale an image in the upcoming Hugo 0.43.
Photo: name / CC-BY-CA

The front matter of this post specifies properties to be assigned to all image resources:

resources:
- src: "**.{png,jpg}"
  title: "Image #:counter"
  params:
    byline: "Photo: Riona MacNamara / CC-BY-CA"

To include the image in a page, specify its details like this:

Fetch and scale an image in the upcoming Hugo 0.43.
Photo: name / CC-BY-CA

The image will be rendered at the size and byline specified in the front matter.

This is the final element on the page and there should be no margin below this.

@chalin,1

https://www.cncf.io/blog/2023/06/05/migrating-docsy-to-bootstrap-5/

1.2 - Diagrams and Formulae

Add generated diagrams and scientific formulae to your site.

Docsy has built-in support for a number of diagram creation and typesetting tools you can use to add rich content to your site, including \(\KaTeX\), Mermaid, Diagrams.net, PlantUML, and MarkMap.

\(\LaTeX\) support with \(\KaTeX\)

\(\LaTeX\) is a high-quality typesetting system for the production of technical and scientific documentation. Due to its excellent math typesetting capabilities, \(\TeX\) became the de facto standard for the communication and publication of scientific documents, especially if these documents contain a lot of mathematical formulae. Designed and mostly written by Donald Knuth, the initial version was released in 1978. Dating back that far, \(\LaTeX\) has pdf as its primary output target and is not particularly well suited for producing HTML output for the Web. Fortunately, with \(\KaTeX\) there exists a fast and easy-to-use JavaScript library for \(\TeX\) math rendering on the web, which was integrated into the Docsy theme.

With \(\KaTeX\) support enabled in Docsy, you can include complex mathematical formulae into your web page, either inline or centred on its own line. Since \(\KaTeX\) relies on server side rendering, it produces the same output regardless of your browser or your environment. Formulae can be shown either inline or in display mode:

Inline formulae

The following code sample produces a text line with three inline formulae:

When \\(a \ne 0\\), there are two solutions to \\(ax^2 + bx + c= 0\\) and they are \\(x = {-b \pm \sqrt{b^2-4ac} \over 2a}\\).

When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c= 0\) and they are \(x = {-b \pm \sqrt{b^2-4ac} \over 2a}\).

Formulae in display mode

The following code sample produces an introductory text line followed by a formula numbered as (1) residing on its own line:

The probability of getting \\(k\\) heads when flipping \\(n\\) coins is:
```math
\tag*{(1)} P(E) = {n \choose k} p^k (1-p)^{n-k}
```

The formula itself is written inside a GLFM math block. The above code fragment renders to:

The probability of getting \(k\) heads when flipping \(n\) coins is:

$$\tag*{(1)} P(E) = {n \choose k} p^k (1-p)^{n-k}$$

Activating and configuring \(\KaTeX\) support

Auto activation

As soon as you use a math code block on your page, support of \(\KaTeX\) is automatically enabled.

Manual activation (no math code block present or hugo 0.92 or lower)

If you want to use inline formulae and don’t have a math code block present in your page which triggers auto activation, you need to manually activate \(\KaTeX\) support. The easiest way to do so is to add a math attribute to the frontmatter of your page and set it to true:

+++
math = true
+++
---
math: true
---
{
  "math": true
}

If you use formulae in most of your pages, you can also enable sitewide \(\KaTeX\) support inside the Docsy theme. To do so update hugo.toml/hugo.yaml/hugo.json:

[params.katex]
enable = true
params:
  katex:
    enable: true
{
  "params": {
    "katex": {
      "enable": true
    }
  }
}

Additionally, you can customize various \(\KaTeX\) options inside hugo.toml/hugo.yaml/hugo.json, if needed:

[params.katex]
# enable/disable KaTeX support
enable = true
# Element(s) scanned by auto render extension. Default: document.body
html_dom_element = "document.body"

[params.katex.options]
# If true (the default), KaTeX will throw a ParseError when it encounters an
# unsupported command or invalid LaTeX. If false, KaTeX will render unsupported
# commands as text, and render invalid LaTeX as its source code with hover text
# giving the error, in the color given by errorColor.
throwOnError = false
errorColor = "#CD5C5C"

# This is a list of delimiters to look for math, processed in the same order as
# the list. Each delimiter has three properties:
#   left:    A string which starts the math expression (i.e. the left delimiter).
#   right:   A string which ends the math expression (i.e. the right delimiter).
#   display: Whether math in the expression should be rendered in display mode.
[[params.katex.options.delimiters]]
  left = "$$"
  right = "$$"
  display = true
[[params.katex.options.delimiters]]
  left = "$"
  right = "$"
  display = false
[[params.katex.options.delimiters]]
  left = "\\("
  right = "\\)"
  display = false
[[params.katex.options.delimiters]]
  left = "\\["
  right = "\\]"
  display = true
params:
  katex:
    enable: true  # enable/disable KaTeX support
    html_dom_element: document.body  # Element(s) scanned by auto render extension. Default: document.body
    options:

      # If true (the default), KaTeX will throw a ParseError when it encounters an
      # unsupported command or invalid LaTeX. If false, KaTeX will render unsupported
      # commands as text, and render invalid LaTeX as its source code with hover text
      # giving the error, in the color given by errorColor.
      throwOnError: false
      errorColor: '#CD5C5C'

      # This is a list of delimiters to look for math, processed in the same order as
      # the list. Each delimiter has three properties:
      #   left:    A string which starts the math expression (i.e. the left delimiter).
      #   right:   A string which ends the math expression (i.e. the right delimiter).
      #   display: Whether math in the expression should be rendered in display mode.
      delimiters:
        - left: $$
          right: $$
          display: true
        - left: $
          right: $
          display: false
        - left: \(
          right: \)
          display: false
        - left: \[
          right: \]
          display: true
{
  "params": {
    "katex": {
      "enable": true,
      "html_dom_element": "document.body",
      "options": {
        "throwOnError": false,
        "errorColor": "#CD5C5C",
        "delimiters": [
          {
            "left": "$$",
            "right": "$$",
            "display": true
          },
          {
            "left": "$",
            "right": "$",
            "display": false
          },
          {
            "left": "\\(",
            "right": "\\)",
            "display": false
          },
          {
            "left": "\\[",
            "right": "\\]",
            "display": true
          }
        ]
      }
    }
  }
}

For a complete list of options and their detailed description, have a look at the documentation of \({\KaTeX}\)’s Rendering API options and of \({\KaTeX}\)’s configuration options.

Display of Chemical Equations and Physical Units

mhchem is a \(\LaTeX\) package for typesetting chemical molecular formulae and equations. Fortunately, \(\KaTeX\) provides the mhchem extension that makes the mhchem package accessible when authoring content for the web. With mhchem extension enabled, you can easily include chemical equations into your page. An equation can be shown either inline or can reside on its own line. The following code sample produces a text line including a chemical equation:

*Precipitation of barium sulfate:* \\(\ce{SO4^2- + Ba^2+ -> BaSO4 v}\\)

Precipitation of barium sulfate: \(\ce{SO4^2- + Ba^2+ -> BaSO4 v}\)

More complex equations need to be displayed on their own line. Use a code block adorned with chem in order to achieve this:

```chem
\tag*{(2)} \ce{Zn^2+  <=>[+ 2OH-][+ 2H+]  $\underset{\text{amphoteric hydroxide}}{\ce{Zn(OH)2 v}}$  <=>[+ 2OH-][+ 2H+]  $\underset{\text{tetrahydroxozincate}}{\ce{[Zn(OH)4]^2-}}$}
```
$$\tag*{(2)} \ce{Zn^2+ <=>[+ 2OH-][+ 2H+] $\underset{\text{amphoteric hydroxide}}{\ce{Zn(OH)2 v}}$ <=>[+ 2OH-][+ 2H+] $\underset{\text{tetrahydroxozincate}}{\ce{[Zn(OH)4]^2-}}$}$$

Use of mhchem is not limited to the authoring of chemical equations, using the included \pu command, pretty looking physical units can be written with ease, too. The following code sample produces two text lines with four numbers plus their corresponding physical units:

* Scientific number notation: \\(\pu{1.2e3 kJ}\\) or \\(\pu{1.2E3 kJ}\\) \\
* Divisions: \\(\pu{123 kJ/mol}\\) or \\(\pu{123 kJ//mol}\\)
  • Scientific number notation: \(\pu{1.2e3 kJ}\) or \(\pu{1.2E3 kJ}\)
  • Divisions: \(\pu{123 kJ/mol}\) or \(\pu{123 kJ//mol}\)

For a complete list of options when authoring physical units, have a look at the section on physical units in the mhchem documentation.

Activating rendering support for chemical formulae

Auto activation

As soon as you use a chem code block on your page, rendering support for chemical equations is automatically enabled.

Manual activation (no chem code block present or hugo 0.92 or lower)

If you want to use chemical formulae inline and don’t have a chem code block present in your page which triggers auto activation, you need to manually activate rendering support for chemical formulae. The easiest way to do so is to add a chem attribute to the frontmatter of your page and set it to true:

+++
chem = true
+++
---
chem: true
---
{
  "chem": true
}

If you use formulae in most of your pages, you can also enable sitewide rendering support for chemical formulae inside the Docsy theme. To do so, enable mhchem inside your hugo.toml/hugo.yaml/hugo.json:

[params.katex]
enable = true

[params.katex.mhchem]
enable = true
params:
  katex:
    enable: true
    mhchem:
      enable: true
{
  "params": {
    "katex": {
      "enable": true,
      "mhchem": {
        "enable": true
      }
    }
  }
}

Diagrams with Mermaid

Mermaid is a Javascript library for rendering simple text definitions to useful diagrams in the browser. It can generate a variety of different diagram types, including flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, user journey diagrams, Gantt charts and pie charts.

With Mermaid support enabled in Docsy, you can include the text definition of a Mermaid diagram inside a code block, and it will automatically be rendered by the browser as soon as the page loads.

The great advantage of this is anyone who can edit the page can now edit the diagram - no more hunting for the original tools and version to make a new edit.

For example, the following defines a sequence diagram:

```mermaid
sequenceDiagram
    autonumber
    Docsy user->>Discussion board: Ask question
    Discussion board->>Community member: read question
    loop Different strategies
    Community member->>Test instance: Investigate issue raised
    end
    Note right of Community member: After hours of investigation:
    Test instance-->>Community member: Come up with solution
    Community member-->>Discussion board: Propose solution
    Discussion board-->>Docsy user: check proposed solution
    Docsy user->>Discussion board: Mark question as resolved
    Docsy user->>Docsy user: Being happy
```

which is automatically rendered to:

sequenceDiagram
    autonumber
    Docsy user->>Discussion board: Ask question
    Discussion board->>Community member: read question
    loop Different strategies
    Community member->>Test instance: Investigate issue raised
    end
    Note right of Community member: After hours of investigation:
    Test instance-->>Community member: Come up with solution
    Community member-->>Discussion board: Propose solution
    Discussion board-->>Docsy user: check proposed solution
    Docsy user->>Discussion board: Mark question as resolved
    Docsy user->>Docsy user: Being happy

Support of Mermaid diagrams is automatically enabled as soon as you use a mermaid code block on your page.

By default, docsy pulls in the latest officially released version of Mermaid at build time. If that doesn’t fit your needs, you can specify the wanted mermaid version inside your configuration file hugo.toml/hugo.yaml/hugo.json:

[params.mermaid]
version = "10.9.0"
params:
  mermaid:
    version: 10.9.0
{
  "params": {
    "mermaid": {
      "version": "10.9.0"
    }
  }
}

If needed, you can define custom settings for your diagrams, such as themes, padding in your hugo.toml/hugo.yaml/hugo.json.

[params.mermaid]
theme = "neutral"

[params.mermaid.flowchart]
diagramPadding = 6
params:
  mermaid:
    theme: neutral
    flowchart:
      diagramPadding: 6
{
  "params": {
    "mermaid": {
      "theme": "neutral",
      "flowchart": {
        "diagramPadding": 6
      }
    }
  }
}

See the Mermaid documentation for a list of defaults that can be overridden.

Settings can also be overridden on a per-diagram basis by making use of a frontmatter config block at the start of the diagram definition.

UML Diagrams with PlantUML

PlantUML is an alternative to Mermaid that lets you quickly create UML diagrams, including sequence diagrams, use case diagrams, and state diagrams. Unlike Mermaid diagrams, which are entirely rendered in the browser, PlantUML uses a PlantUML server to create diagrams. You can use the provided default demo server (not recommended for production use), or run a server yourself. PlantUML offers a wider range of image types than Mermaid, so may be a better choice for some use cases.

Diagrams are defined using a simple and intuitive language. (see PlantUML Language Reference Guide).

The following example shows a use case diagram:

```plantuml
participant participant as Foo
actor       actor       as Foo1
boundary    boundary    as Foo2
control     control     as Foo3
entity      entity      as Foo4
database    database    as Foo5
collections collections as Foo6
queue       queue       as Foo7
Foo -> Foo1 : To actor
Foo -> Foo2 : To boundary
Foo -> Foo3 : To control
Foo -> Foo4 : To entity
Foo -> Foo5 : To database
Foo -> Foo6 : To collections
Foo -> Foo7: To queue
```

Automatically renders to:

participant participant as Foo
actor       actor       as Foo1
boundary    boundary    as Foo2
control     control     as Foo3
entity      entity      as Foo4
database    database    as Foo5
collections collections as Foo6
queue       queue       as Foo7
Foo -> Foo1 : To actor
Foo -> Foo2 : To boundary
Foo -> Foo3 : To control
Foo -> Foo4 : To entity
Foo -> Foo5 : To database
Foo -> Foo6 : To collections
Foo -> Foo7: To queue

To enable/disable PlantUML, update hugo.toml/hugo.yaml/hugo.json:

[params.plantuml]
enable = true
params:
  plantuml:
    enable: true
{
  "params": {
    "plantuml": {
      "enable": true
    }
  }
}

Other optional settings are:

[params.plantuml]
enable = true
theme = "default"

# Set url to plantuml server
# default is http://www.plantuml.com/plantuml/svg/
svg_image_url = "https://www.plantuml.com/plantuml/svg/"

# By default the plantuml implementation uses <img /> tags to display UML diagrams.
# When svg is set to true, diagrams are displayed using <svg /> tags, maintaining functionality like links e.g.
# default = false
svg = true
params:
  plantuml:
    enable: true
    theme: default
    # Set url to plantuml server
    # default is http://www.plantuml.com/plantuml/svg/
    svg_image_url: 'https://www.plantuml.com/plantuml/svg/'
    # By default the plantuml implementation uses <img /> tags to display UML diagrams.
    # When svg is set to true, diagrams are displayed using <svg /> tags, maintaining functionality like links e.g.
    # default = false
    svg: true
{
  "params": {
    "plantuml": {
      "enable": true,
      "theme": "default",
      "svg_image_url": "https://www.plantuml.com/plantuml/svg/",
      "svg": true
    }
  }
}

MindMap support with MarkMap

MarkMap is a Javascript library for rendering simple text definitions to MindMap in the browser.

For example, the following defines a simple MindMap:

```markmap
# markmap

## Links

- <https://markmap.js.org/>
- [GitHub](https://github.com/gera2ld/markmap)

## Related

- [coc-markmap](https://github.com/gera2ld/coc-markmap)
- [gatsby-remark-markmap](https://github.com/gera2ld/gatsby-remark-markmap)

## Features

- links
- **inline** ~~text~~ *styles*
- multiline
  text
- `inline code`
-
    ```js
    console.log('code block');
    ```
- Katex - $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$
```

Automatically renders to:

# markmap

## Links

- <https://markmap.js.org/>
- [GitHub](https://github.com/gera2ld/markmap)

## Related

- [coc-markmap](https://github.com/gera2ld/coc-markmap)
- [gatsby-remark-markmap](https://github.com/gera2ld/gatsby-remark-markmap)

## Features

- links
- **inline** ~~text~~ *styles*
- multiline
  text
- `inline code`
-
    ```js
    console.log('code block');
    ```
- Katex - $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$

To enable/disable MarkMap, update hugo.toml/hugo.yaml/hugo.json:

[params.markmap]
enable = true
params:
  markmap:
    enable: true
{
  "params": {
    "markmap": {
      "enable": true
    }
  }
}

Diagrams with Diagrams.net

Diagrams.net (aka draw.io) provides a free and open source diagram editor that can generate a wider range of diagrams than Mermaid or PlantUML using a web or desktop editor.

SVG and PNG files exported with the tool contain the source code of the original diagram by default, which allows the diagrams.net site to import those images again for edit in the future. With draw.io enabled, Docsy will detect this and automatically add an Edit button over any image that can be edited using the online site.

Hover over the image below and click edit to instantly start working with it. Clicking the Save button will cause the edited diagram to be exported using the same filename and filetype, and downloaded to your browser.

As the diagram data is transported via the browser, the diagrams.net server does not need to access the content on your Docsy server directly at all.

Mouse over the above image and click the Edit button!

Mouse over the above image and click the Edit button!

To enable detection of diagrams, update hugo.toml/hugo.yaml/hugo.json:

[params.drawio]
enable = true
params:
  drawio:
    enable: true
{
  "params": {
    "drawio": {
      "enable": true
    }
  }
}

You can also deploy and use your own server for editing diagrams, in which case update the configuration to point to that server:

[params.drawio]
drawio_server = "https://app.mydrawioserver.example.com"
params:
  drawio:
    drawio_server: 'https://app.mydrawioserver.example.com'
{
  "params": {
    "drawio": {
      "drawio_server": "https://app.mydrawioserver.example.com"
    }
  }
}

2 - Class Contents

Class Contents

2.1 - Tohoku Univ.

Tohoku Univ.

2.1.1 - Specialized Education

Specialized Education

2.1.1.1 - Exercise in Mathematics and Physics Ⅱ

Exercise in Mathematics and Physics Ⅱ

2.1.1.1.1 - Chapter 25 Solutions

Chapter 25 Solutions

Chapter 25 Solutions


1. Complex Trigonometric Equation

Problem

Find all complex numbers \(z\) which satisfy the equation \(\sin(z) = 5\).

Solution

We use the exponential definition of the sine function for a complex variable \(z = x + iy\):

$$\sin(z) = \frac{e^{iz} - e^{-iz}}{2i}$$

Set this equal to 5:

$$\frac{e^{iz} - e^{-iz}}{2i} = 5$$
$$e^{iz} - e^{-iz} = 10i$$

To solve this, we make a substitution. Let \(w = e^{iz}\). Then \(e^{-iz} = \frac{1}{w}\). The equation becomes:

$$w - \frac{1}{w} = 10i$$

Multiply the entire equation by \(w\) to eliminate the fraction:

$$w^2 - 1 = 10iw$$

Rearrange this into a standard quadratic equation \(aw^2 + bw + c = 0\):

$$w^2 - 10iw - 1 = 0$$

We solve for \(w\) using the quadratic formula \(w = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\):

$$w = \frac{10i \pm \sqrt{(-10i)^2 - 4(1)(-1)}}{2(1)}$$
$$w = \frac{10i \pm \sqrt{-100 + 4}}{2} = \frac{10i \pm \sqrt{-96}}{2}$$
$$w = \frac{10i \pm i\sqrt{96}}{2} = \frac{10i \pm 4i\sqrt{6}}{2} = (5 \pm 2\sqrt{6})i$$

Now we have two possible values for \(w\). We must solve for \(z\) by substituting back \(w = e^{iz}\), which means \(iz = \log(w)\). Remember that the complex logarithm is multi-valued: \(\log(w) = \ln|w| + i(\arg(w) + 2n\pi)\) for \(n \in \mathbb{Z}\).

Case 1: \(w = (5 + 2\sqrt{6})i\)

\(|w| = 5 + 2\sqrt{6}\). The argument \(\arg(w)\) is \(\frac{\pi}{2}\) since it’s on the positive imaginary axis.

$$iz = \ln(5 + 2\sqrt{6}) + i\left(\frac{\pi}{2} + 2n\pi\right)$$

Multiply by \(\frac{1}{i} = -i\):

$$z = -i\ln(5 + 2\sqrt{6}) + \left(\frac{\pi}{2} + 2n\pi\right)$$

Case 2: \(w = (5 - 2\sqrt{6})i\)

\(|w| = 5 - 2\sqrt{6}\). The argument \(\arg(w)\) is also \(\frac{\pi}{2}\).

$$iz = \ln(5 - 2\sqrt{6}) + i\left(\frac{\pi}{2} + 2n\pi\right)$$

Multiply by \(\frac{1}{i} = -i\):

$$z = -i\ln(5 - 2\sqrt{6}) + \left(\frac{\pi}{2} + 2n\pi\right)$$

Note that \(\ln(5 - 2\sqrt{6}) = \ln\left(\frac{(5 - 2\sqrt{6})(5 + 2\sqrt{6})}{5 + 2\sqrt{6}}\right) = \ln\left(\frac{1}{5 + 2\sqrt{6}}\right) = -\ln(5 + 2\sqrt{6})\). So, this second case gives \(z = i \ln(5 + 2\sqrt{6}) + \left(\frac{\pi}{2} + 2n\pi\right)\).

We can combine both cases into a single expression:

$$z = \left(2n + \frac{1}{2}\right)\pi \pm i\ln(5 + 2\sqrt{6}), \quad n \in \mathbb{Z}$$

4. Cauchy’s Integral Formula / Residue Theorem

Problem

For the path integral \(\oint_C \frac{z}{(z - 3)(z + 1 + i)} dz\), calculate its values at \(|z| = 1\) and \(|z| = 4\).

Solution

The integrand is \(f(z) = \frac{z}{(z - 3)(z - (-1 - i))}\). The function has two simple poles at \(z_1 = 3\) and \(z_2 = -1 - i\).

Case 1: C is the circle \(|z| = 1\)

We check if the poles lie inside the contour \(C\).

  • For \(z_1 = 3\): \(|z_1| = |3| = 3\). Since \(3 > 1\), this pole is outside the contour.
  • For \(z_2 = -1 - i\): \(|z_2| = |-1 - i| = \sqrt{(-1)^2 + (-1)^2} = \sqrt{2} \approx 1.414\). Since \(\sqrt{2} > 1\), this pole is also outside the contour.

Since the function \(f(z)\) is analytic everywhere inside and on the contour \(|z|=1\), by Cauchy’s Integral Theorem, the value of the integral is 0.

Case 2: C is the circle \(|z| = 4\)

We check if the poles lie inside this new contour.

  • For \(z_1 = 3\): \(|z_1| = 3\). Since \(3 < 4\), this pole is inside the contour.
  • For \(z_2 = -1 - i\): \(|z_2| = \sqrt{2}\). Since \(\sqrt{2} < 4\), this pole is also inside the contour.

Since both poles are inside, we use the Residue Theorem. The integral is \(2\pi i\) times the sum of the residues at the enclosed poles.

  • Residue at \(z_1 = 3\):
    $$\text{Res}(f, 3) = \lim_{z\to 3} (z-3)f(z) = \lim_{z\to 3} \frac{z}{z+1+i} = \frac{3}{4+i}$$
    $$= \frac{3(4-i)}{(4+i)(4-i)} = \frac{12-3i}{16-i^2} = \frac{12-3i}{17}$$
  • Residue at \(z_2 = -1 - i\):
    $$\text{Res}(f, -1-i) = \lim_{z\to -1-i} (z-(-1-i))f(z) = \lim_{z\to -1-i} \frac{z}{z-3} = \frac{-1-i}{-1-i-3} = \frac{-(1+i)}{-(4+i)} = \frac{1+i}{4+i}$$
    $$= \frac{(1+i)(4-i)}{(4+i)(4-i)} = \frac{4-i+4i-i^2}{17} = \frac{5+3i}{17}$$
  • Sum of residues:
    $$\frac{12 - 3i}{17} + \frac{5 + 3i}{17} = \frac{17}{17} = 1$$

The value of the integral is \(2\pi i \times (\text{Sum of residues}) = 2\pi i \times 1 = \mathbf{2\pi i}\).


5. Path Integral on the Unit Circle

Problem

For the path integral \(\oint_C \frac{d\theta}{z + \cos\theta}\) calculate its value at \(|z| = 1\) (where \(z = e^{i\theta}, 0 \le \theta \le 2\pi\)).

Solution

We convert the entire integral into the \(z\) domain. The contour \(C\) is the unit circle.

  • \(z = e^{i\theta}\)
  • \(dz = i e^{i\theta} d\theta = iz d\theta \implies d\theta = \frac{dz}{iz}\)
  • \(\cos\theta = \frac{e^{i\theta} + e^{-i\theta}}{2} = \frac{z + 1/z}{2}\)

Substitute these into the integral:

$$\oint_C \frac{1}{z + \frac{z+1/z}{2}} \cdot \frac{dz}{iz}$$

Simplify the expression inside the integral:

$$= \oint_C \frac{1}{\frac{2z + z + 1/z}{2}} \cdot \frac{dz}{iz} = \oint_C \frac{2}{3z + 1/z} \cdot \frac{dz}{iz}$$
$$= \oint_C \frac{2}{\frac{3z^2+1}{z}} \cdot \frac{dz}{iz} = \oint_C \frac{2z}{3z^2+1} \cdot \frac{dz}{iz}$$
$$= \frac{2}{i} \oint_C \frac{1}{3z^2+1} dz$$

Now we use the Residue Theorem. The poles are the roots of \(3z^2 + 1 = 0\), which means \(z^2 = -1/3\), so \(z = \pm \frac{i}{\sqrt{3}}\).

Both poles, \(z_1 = \frac{i}{\sqrt{3}}\) and \(z_2 = -\frac{i}{\sqrt{3}}\), have a magnitude of \(\frac{1}{\sqrt{3}} \approx 0.577\), which is less than 1. Therefore, both poles are inside the unit circle contour.

Let \(g(z) = \frac{1}{3z^2+1} = \frac{1}{3(z - i/\sqrt{3})(z + i/\sqrt{3})}\).

  • Residue at \(z_1 = i/\sqrt{3}\):
    $$\text{Res}(g, i/\sqrt{3}) = \lim_{z\to i/\sqrt{3}} (z - i/\sqrt{3})g(z) = \lim_{z\to i/\sqrt{3}} \frac{1}{3(z + i/\sqrt{3})} = \frac{1}{3(2i/\sqrt{3})} = \frac{1}{2i\sqrt{3}}$$
  • Residue at \(z_2 = -i/\sqrt{3}\):
    $$\text{Res}(g, -i/\sqrt{3}) = \lim_{z\to -i/\sqrt{3}} (z + i/\sqrt{3})g(z) = \lim_{z\to -i/\sqrt{3}} \frac{1}{3(z - i/\sqrt{3})} = \frac{1}{3(-2i/\sqrt{3})} = -\frac{1}{2i\sqrt{3}}$$
  • Sum of residues:
    $$\frac{1}{2i\sqrt{3}} - \frac{1}{2i\sqrt{3}} = 0$$

The value of the integral is \(\frac{2}{i} \times (2\pi i \times \text{Sum of residues}) = \frac{2}{i} \times (2\pi i \times 0) = \mathbf{0}\).


6. Real Integral using Contour Integration

Problem

Calculate the integral \(\int_{-\infty}^{\infty} \frac{x \sin(x)}{x^2 + a^2} dx\).

Solution

We use contour integration. Consider the complex function:

$$f(z) = \frac{z e^{iz}}{z^2 + a^2}$$

The integral we want is the imaginary part of the integral of \(f(z)\) along the real axis:

$$\int_{-\infty}^{\infty} \frac{x \sin x}{x^2+a^2} dx = \text{Im} \left[ \int_{-\infty}^{\infty} \frac{x e^{ix}}{x^2+a^2} dx \right]$$

We integrate \(f(z)\) over a semi-circular contour \(C\) in the upper half-plane, consisting of the real axis from \(-R\) to \(R\) and a semi-circular arc \(\Gamma\) of radius \(R\). As \(R \to \infty\):

$$\oint_C f(z) dz = \int_{-\infty}^{\infty} f(x) dx + \lim_{R \to \infty} \int_{\Gamma} f(z) dz$$

By Jordan’s Lemma, the integral over the arc \(\Gamma\) goes to zero as \(R \to \infty\). Thus:

$$\int_{-\infty}^{\infty} f(x)dx = \oint_C f(z)dz$$

Now we find the value of the contour integral using the Residue Theorem. The poles of \(f(z) = \frac{z e^{iz}}{(z - ia)(z + ia)}\) are at \(z = \pm ia\). Assuming \(a > 0\), only the pole at \(z = ia\) is inside our contour in the upper half-plane.

  • Residue at \(z = ia\):
    $$\text{Res}(f, ia) = \lim_{z\to ia} (z-ia)f(z) = \lim_{z\to ia} \frac{ze^{iz}}{z+ia}$$
    $$= \frac{(ia)e^{i(ia)}}{ia+ia} = \frac{iae^{-a}}{2ia} = \frac{e^{-a}}{2}$$

The contour integral is \(2\pi i\) times the sum of residues inside \(C\):

$$\oint_C f(z) dz = 2\pi i \left(\frac{e^{-a}}{2}\right) = i\pi e^{-a}$$

Equating this with the real integral:

$$\int_{-\infty}^{\infty} \frac{x e^{ix}}{x^2+a^2} dx = i\pi e^{-a}$$
$$\int_{-\infty}^{\infty} \frac{x (\cos x + i \sin x)}{x^2+a^2} dx = 0 + i(\pi e^{-a})$$

By equating the imaginary parts of both sides, we get our result:

$$\int_{-\infty}^{\infty} \frac{x \sin x}{x^2+a^2} dx = \mathbf{\pi e^{-a}}$$

2.1.1.1.2 - Chapter 26 Solutions

Chapter 26 Solutions

Chapter 26 Solutions


1. Solving ODEs with Complex Functions

Problem

Solve the following differential equations using complex functions:

$$\frac{d^2x}{dt^2} + 3\frac{dx}{dt} + 2x = \cos(4t)$$
$$\frac{d^2y}{dt^2} + 3\frac{dy}{dt} + 2y = \sin(4t)$$

Solution

We can combine these two real equations into a single complex differential equation by defining \(Z(t) = x(t) + i y(t)\). The forcing function becomes \(\cos(4t) + i \sin(4t) = e^{i4t}\).

The complex ODE is:

$$\frac{d^2Z}{dt^2} + 3\frac{dZ}{dt} + 2Z = e^{i4t}$$

We seek a particular (steady-state) solution of the form \(Z_p = A e^{i4t}\), where \(A\) is a complex constant. We find its derivatives:

$$\frac{dZ_p}{dt} = 4i A e^{i4t}$$
$$\frac{d^2Z_p}{dt^2} = (4i)^2 A e^{i4t} = -16 A e^{i4t}$$

Substitute these into the complex ODE:

$$(-16A)e^{i4t} + 3(4iA)e^{i4t} + 2(A)e^{i4t} = e^{i4t}$$

Divide by \(e^{i4t}\):

$$-16A + 12iA + 2A = 1$$
$$A(-14 + 12i) = 1$$
$$A = \frac{1}{-14 + 12i}$$

Now, we rationalize the complex number \(A\):

$$A = \frac{1}{-14 + 12i} \times \frac{-14 - 12i}{-14 - 12i} = \frac{-14 - 12i}{(-14)^2 + 12^2} = \frac{-14 - 12i}{196 + 144} = \frac{-14 - 12i}{340}$$
$$A = -\frac{14}{340} - i\frac{12}{340} = -\frac{7}{170} - i\frac{3}{85}$$

Now we find the complex solution \(Z_p\):

$$Z_p = \left(-\frac{7}{170} - i\frac{3}{85}\right) e^{i4t}$$
$$Z_p = \left(-\frac{7}{170} - i\frac{3}{85}\right) (\cos(4t) + i \sin(4t))$$
$$Z_p = \left(-\frac{7}{170}\cos(4t) + \frac{3}{85}\sin(4t)\right) + i\left(-\frac{7}{170}\sin(4t) - \frac{3}{85}\cos(4t)\right)$$

The solutions for \(x(t)\) and \(y(t)\) are the real and imaginary parts of \(Z_p\), respectively. \(x(t) = \text{Re}(Z_p)\) = \(\frac{3}{85}\sin(4t) - \frac{7}{170}\cos(4t)\) \(y(t) = \text{Im}(Z_p)\) = \(-\frac{7}{170}\sin(4t) - \frac{3}{85}\cos(4t)\)


2. Complex Potential Function

Problem

Given a complex function \(f(z) = z + \frac{a^2}{z}\):

  1. Find the real part \(\Phi(r, \theta)\) and the imaginary part \(\Psi(r, \theta)\) of \(f(z)\).
  2. Show \(\left. \frac{\partial\Phi}{\partial r} \right|_{r=a} = 0\).

Solution

(1) Real and Imaginary Parts

We express \(z\) in polar coordinates as \(z = r e^{i\theta} = r(\cos\theta + i \sin\theta)\). Substitute this into \(f(z)\):

$$f(z) = r(\cos\theta + i \sin\theta) + \frac{a^2}{r(\cos\theta + i \sin\theta)}$$

For the second term, we use \(\frac{1}{e^{i\theta}} = e^{-i\theta} = \cos\theta - i \sin\theta\):

$$f(z) = r \cos\theta + i r \sin\theta + \frac{a^2}{r}(\cos\theta - i \sin\theta)$$

Now, we group the real and imaginary terms:

$$f(z) = \left(r \cos\theta + \frac{a^2}{r}\cos\theta\right) + i\left(r \sin\theta - \frac{a^2}{r}\sin\theta\right)$$
$$f(z) = \left(r + \frac{a^2}{r}\right)\cos\theta + i\left(r - \frac{a^2}{r}\right)\sin\theta$$

The real part \(\Phi\) (the velocity potential) and the imaginary part \(\Psi\) (the stream function) are: \(\Phi(r, \theta) = \left(r + \frac{a^2}{r}\right)\cos\theta\) \(\Psi(r, \theta) = \left(r - \frac{a^2}{r}\right)\sin\theta\)

(2) Show the Boundary Condition

We need to calculate the partial derivative of \(\Phi\) with respect to \(r\) and then evaluate it at \(r=a\).

First, find \(\frac{\partial\Phi}{\partial r}\):

$$\frac{\partial\Phi}{\partial r} = \frac{\partial}{\partial r} \left[ \left(r + \frac{a^2}{r}\right)\cos\theta \right]$$

Since \(\cos\theta\) is treated as a constant with respect to \(r\):

$$\frac{\partial\Phi}{\partial r} = \left[ \frac{\partial}{\partial r}(r) + \frac{\partial}{\partial r}(a^2r^{-1}) \right] \cos\theta$$
$$\frac{\partial\Phi}{\partial r} = \left[ 1 - a^2r^{-2} \right] \cos\theta = \left(1 - \frac{a^2}{r^2}\right)\cos\theta$$

Now, evaluate this derivative at \(r = a\):

$$\left. \frac{\partial\Phi}{\partial r} \right|_{r=a} = \left(1 - \frac{a^2}{a^2}\right)\cos\theta$$
$$= (1 - 1)\cos\theta = 0 \cdot \cos\theta = \mathbf{0}$$

This confirms that the radial velocity \(u_r\) is zero on the circle \(r=a\), which is the correct boundary condition for non-penetrating flow around a cylinder. ✅


3. Boundary Condition for Flow in a Corner

Problem

Regarding the flow shown in Figure 26-3, find the boundary condition corresponding to eq. (26-10) with respect to \(\Psi\).

Solution

Figure 26-3 typically depicts potential flow within a 90-degree corner, where the boundaries are the positive x-axis and the positive y-axis.

  • Physical Meaning of \(\Psi\): The imaginary part of the complex potential, \(\Psi\), is the stream function. By definition, lines where \(\Psi\) is constant are streamlines, which are the paths that fluid particles follow.

  • Boundary Condition on a Solid Wall: In ideal fluid flow, there can be no flow across (i.e., through) a solid boundary. This means that any solid boundary must itself be a streamline.

  • Applying to the Figure: The walls in the figure are the positive x-axis (\(y=0, x>0\)) and the positive y-axis (\(x=0, y>0\)). Since these are solid boundaries, they must be streamlines. Therefore, the stream function \(\Psi\) must be constant along these axes.

By convention, the constant value for one of the boundaries is chosen to be zero. For the flow in a corner bounded by the positive x and y axes, the boundary condition for the stream function \(\Psi\) is:

\(\Psi = 0\) on the positive x-axis and the positive y-axis.

This ensures that the axes themselves represent the path of the fluid particles adjacent to the walls, fulfilling the no-flow-through condition.

2.1.1.2 - Mathematics Ⅱ

Mathematics Ⅱ

2.1.1.2.1 - 4 - Fourier Transform

4 - Fourier Transform

Fourier Transform and Integral Evaluation


(1-1) Find the Fourier transform of \(f(x) = e^{-|x|}\)

We define the Fourier transform of a function \(f(x)\) as:

$$\hat{f}(k) = \mathcal{F}[f(x)] = \int_{-\infty}^{\infty} f(x)e^{-ikx}dx$$

For the function \(f(x) = e^{-|x|}\), we split the integral based on the definition of the absolute value:

$$\begin{align*} \hat{f}(k) &= \int_{-\infty}^{0} e^x e^{-ikx}dx + \int_{0}^{\infty} e^{-x} e^{-ikx}dx \\ &= \int_{-\infty}^{0} e^{(1-ik)x}dx + \int_{0}^{\infty} e^{-(1+ik)x}dx \end{align*}$$

Now, we evaluate each integral:

$$\begin{align*} \hat{f}(k) &= \left[ \frac{e^{(1-ik)x}}{1-ik} \right]_{-\infty}^{0} + \left[ \frac{e^{-(1+ik)x}}{-(1+ik)} \right]_{0}^{\infty} \\ &= \left( \frac{e^0}{1-ik} - \lim_{x\to-\infty} \frac{e^{(1-ik)x}}{1-ik} \right) + \left( \lim_{x\to\infty} \frac{e^{-(1+ik)x}}{-(1+ik)} - \frac{e^0}{-(1+ik)} \right) \\ &= \left( \frac{1}{1-ik} - 0 \right) + \left( 0 - \frac{1}{-(1+ik)} \right) \\ &= \frac{1}{1-ik} + \frac{1}{1+ik} \end{align*}$$

Combining the fractions, we get:

$$\hat{f}(k) = \frac{(1+ik) + (1-ik)}{(1-ik)(1+ik)} = \frac{2}{1-(ik)^2} = \frac{2}{1+k^2}$$

So, the Fourier transform is: \(\hat{f}(k) = \frac{2}{1+k^2}\).

(1-2) Evaluate the integral \(\int_{-\infty}^{\infty} \frac{1}{(1+x^2)^2}dx\)

We will use Plancherel’s Theorem (also known as Parseval’s identity for Fourier transforms), which states:

$$\int_{-\infty}^{\infty} |f(x)|^2 dx = \frac{1}{2\pi} \int_{-\infty}^{\infty} |\hat{f}(k)|^2 dk$$

First, we evaluate the left-hand side (LHS) with our original function \(f(x) = e^{-|x|}\):

$$\int_{-\infty}^{\infty} |e^{-|x|}|^2 dx = \int_{-\infty}^{\infty} e^{-2|x|}dx = 2\int_{0}^{\infty} e^{-2x}dx = 2\left[-\frac{e^{-2x}}{2}\right]_{0}^{\infty} = 2\left(0 - (-\frac{1}{2})\right) = 1$$

Next, we evaluate the right-hand side (RHS) using the Fourier transform \(\hat{f}(k) = \frac{2}{1+k^2}\):

$$\frac{1}{2\pi} \int_{-\infty}^{\infty} \left| \frac{2}{1+k^2} \right|^2 dk = \frac{1}{2\pi} \int_{-\infty}^{\infty} \frac{4}{(1+k^2)^2}dk = \frac{2}{\pi} \int_{-\infty}^{\infty} \frac{1}{(1+k^2)^2}dk$$

By equating the LHS and RHS (\(1 = \frac{2}{\pi} \int \dots\)), we can solve for the integral. Replacing the dummy variable \(k\) with \(x\), we find:

$$\int_{-\infty}^{\infty} \frac{1}{(1+x^2)^2}dx = \frac{\pi}{2}$$

The value of the integral is \(\frac{\pi}{2}\).

Fourier Cosine Transform and Integral Evaluation


(2-1) Find the Fourier cosine transform of the given function

The function is a triangular pulse defined as:

$$f(x) = \begin{cases} 1 - \frac{|x|}{2} & \text{if } |x| \le 2 \\ 0 & \text{if } |x| > 2 \end{cases}$$

Since \(f(x)\) is an even function, we can find its Fourier cosine transform using the definition:

$$\hat{f}_c(\omega) = \int_{0}^{\infty} f(x)\cos(\omega x)dx$$

For our function, this becomes:

$$\begin{align*} \hat{f}_c(\omega) &= \int_{0}^{2} \left(1 - \frac{x}{2}\right)\cos(\omega x)dx \\ &= \int_{0}^{2} \cos(\omega x)dx - \frac{1}{2} \int_{0}^{2} x\cos(\omega x)dx \end{align*}$$

The first integral is:

$$\int_{0}^{2} \cos(\omega x)dx = \left[\frac{\sin(\omega x)}{\omega}\right]_{0}^{2} = \frac{\sin(2\omega)}{\omega}$$

For the second integral, we use integration by parts (\(\int u dv = uv - \int v du\)) with \(u=x\) and \(dv = \cos(\omega x)dx\):

$$\begin{align*} \int_{0}^{2} x\cos(\omega x)dx &= \left[\frac{x\sin(\omega x)}{\omega}\right]_{0}^{2} - \int_{0}^{2} \frac{\sin(\omega x)}{\omega}dx \\ &= \frac{2\sin(2\omega)}{\omega} - \left[-\frac{\cos(\omega x)}{\omega^2}\right]_{0}^{2} \\ &= \frac{2\sin(2\omega)}{\omega} + \left(\frac{\cos(2\omega)}{\omega^2} - \frac{\cos(0)}{\omega^2}\right) = \frac{2\sin(2\omega)}{\omega} + \frac{\cos(2\omega)-1}{\omega^2} \end{align*}$$

Combining everything:

$$\begin{align*} \hat{f}_c(\omega) &= \frac{\sin(2\omega)}{\omega} - \frac{1}{2}\left(\frac{2\sin(2\omega)}{\omega} + \frac{\cos(2\omega)-1}{\omega^2}\right) \\ &= \frac{\sin(2\omega)}{\omega} - \frac{\sin(2\omega)}{\omega} - \frac{\cos(2\omega)-1}{2\omega^2} \\ &= \frac{1-\cos(2\omega)}{2\omega^2} \end{align*}$$

Using the half-angle identity \(1-\cos(2\theta) = 2\sin^2(\theta)\), the final transform is:

$$\hat{f}_c(\omega) = \frac{2\sin^2(\omega)}{2\omega^2} = \left(\frac{\sin(\omega)}{\omega}\right)^2$$

The Fourier cosine transform is \(\hat{f}_c(\omega) = \left(\frac{\sin\omega}{\omega}\right)^2\).

(2-2) Evaluate the integral \(\int_{0}^{\infty} \left(\frac{\sin x}{x}\right)^2 dx\)

We use the inverse Fourier cosine transform:

$$f(x) = \frac{2}{\pi} \int_{0}^{\infty} \hat{f}_c(\omega)\cos(\omega x)d\omega$$

Substituting our result and evaluating at \(x=0\):

$$f(0) = \frac{2}{\pi} \int_{0}^{\infty} \left(\frac{\sin\omega}{\omega}\right)^2 \cos(0)d\omega = \frac{2}{\pi} \int_{0}^{\infty} \left(\frac{\sin\omega}{\omega}\right)^2 d\omega$$

From the function’s definition, we know that \(f(0) = 1 - \frac{|0|}{2} = 1\). Equating the two expressions for \(f(0)\):

$$1 = \frac{2}{\pi} \int_{0}^{\infty} \left(\frac{\sin\omega}{\omega}\right)^2 d\omega$$

Solving for the integral and replacing the dummy variable \(\omega\) with \(x\) gives:

$$\int_{0}^{\infty} \left(\frac{\sin x}{x}\right)^2 dx = \frac{\pi}{2}$$

The value of the integral is \(\frac{\pi}{2}\).

2.1.1.2.2 - 5 - PDE

5 - PDE

Here is a detailed solution to the heat conduction problem.


(1) Obtain two ODEs by the method of separating variables

We are given the partial differential equation (PDE):

$$\frac{\partial u}{\partial t} = \alpha \frac{\partial^2 u}{\partial x^2}$$

We assume a solution of the form \(u(x,t) = X(x)T(t)\). Substituting this into the PDE gives:

$$X(x)T'(t) = \alpha X''(x)T(t)$$

To separate the variables, we divide by \(\alpha X(x)T(t)\):

$$\frac{T'(t)}{\alpha T(t)} = \frac{X''(x)}{X(x)}$$

Since the left side depends only on \(t\) and the right side depends only on \(x\), they must both be equal to a constant. We call this the separation constant, \(k\). This leads to two ordinary differential equations (ODEs):

  • Time-dependent ODE: \(\frac{T’(t)}{\alpha T(t)} = k \implies T’(t) - \alpha k T(t) = 0\)
  • Space-dependent ODE: \(\frac{X’’(x)}{X(x)} = k \implies X’’(x) - k X(x) = 0\)

(2) Show that the separation constant k must be negative

We analyze the spatial ODE \(X’’(x) - kX(x) = 0\) along with the boundary conditions. The boundary conditions for \(u(x,t)\) are \(u_x(0,t) = 0\) and \(u_x(2,t) = 0\). In terms of \(X(x)\), these become \(X’(0) = 0\) and \(X’(2) = 0\).

  • Case 1: \(k > 0\). Let \(k = \lambda^2\) where \(\lambda > 0\). The ODE is \(X’’(x) - \lambda^2 X(x) = 0\). The general solution is \(X(x) = C_1 e^{\lambda x} + C_2 e^{-\lambda x}\). The derivative is \(X’(x) = C_1 \lambda e^{\lambda x} - C_2 \lambda e^{-\lambda x}\). Applying the boundary conditions:

    • \(X’(0) = C_1\lambda - C_2\lambda = \lambda(C_1 - C_2) = 0 \implies C_1 = C_2\).
    • \(X’(2) = C_1\lambda e^{2\lambda} - C_2\lambda e^{-2\lambda} = C_1\lambda(e^{2\lambda} - e^{-2\lambda}) = 0\). Since \(\lambda > 0\), the term \((e^{2\lambda} - e^{-2\lambda})\) is not zero. Thus, we must have \(C_1 = 0\), which implies \(C_2 = 0\). This gives \(X(x) = 0\), the trivial solution, which is not of interest.
  • Case 2: \(k = 0\). The ODE is \(X’’(x) = 0\). The general solution is \(X(x) = C_1 x + C_2\). The derivative is \(X’(x) = C_1\). Applying the boundary conditions:

    • \(X’(0) = C_1 = 0\).
    • \(X’(2) = C_1 = 0\). This requires \(C_1 = 0\), but \(C_2\) can be any constant. So, \(X(x) = C_2\) is a non-trivial solution. This constant solution is physically important as it relates to the steady-state temperature.
  • Case 3: \(k < 0\). Let \(k = -\lambda^2\) where \(\lambda > 0\). The ODE is \(X’’(x) + \lambda^2 X(x) = 0\). The general solution is \(X(x) = C_1\cos(\lambda x) + C_2\sin(\lambda x)\). The derivative is \(X’(x) = -C_1\lambda\sin(\lambda x) + C_2\lambda\cos(\lambda x)\). Applying the boundary conditions:

    • \(X’(0) = -C_1\lambda(0) + C_2\lambda(1) = C_2\lambda = 0 \implies C_2 = 0\).
    • With \(C_2=0\), the second condition becomes \(X’(2) = -C_1\lambda\sin(2\lambda) = 0\). To have a non-trivial solution, we need \(C_1 \ne 0\), which means we must have \(\sin(2\lambda) = 0\). This occurs when \(2\lambda = n\pi\) for \(n = 1, 2, 3, \dots\).

Therefore, to obtain non-trivial, time-decaying solutions of interest, the separation constant \(k\) must be negative. The case \(k=0\) gives a constant steady-state solution.


(3) Find u(x, t) for the initial condition f(x) = 100

From our analysis, the eigenvalues are \(\lambda_n = \frac{n\pi}{2}\), which gives \(k_n = -\lambda_n^2 = -\left(\frac{n\pi}{2}\right)^2\) for \(n=1, 2, \dots\). The case \(k=0\) corresponds to an eigenvalue \(\lambda_0 = 0\). The general solution is a superposition of all possible solutions:

$$u(x,t) = A_0 + \sum_{n=1}^{\infty} A_n \cos\left(\frac{n\pi x}{2}\right) e^{-\alpha(n\pi/2)^2 t}$$

We apply the initial condition \(u(x,0) = f(x) = 100\):

$$100 = A_0 + \sum_{n=1}^{\infty} A_n \cos\left(\frac{n\pi x}{2}\right)$$

This is the Fourier cosine series for the function \(f(x) = 100\). By inspection, we can see that the function is already a constant. The constant term \(A_0\) must be 100, and all other coefficients \(A_n\) for \(n \ge 1\) must be 0.

Alternatively, using the formula for Fourier cosine coefficients on an interval \([0, L]\) with \(L=2\):

$$A_0 = \frac{1}{L}\int_0^L f(x)dx = \frac{1}{2}\int_0^2 100\,dx = \frac{1}{2}[100x]_0^2 = 100.$$
$$A_n = \frac{2}{L}\int_0^L f(x)\cos\left(\frac{n\pi x}{L}\right)dx = \frac{2}{2}\int_0^2 100\cos\left(\frac{n\pi x}{2}\right)dx = 100\left[\frac{2}{n\pi}\sin\left(\frac{n\pi x}{2}\right)\right]_0^2 = 0.$$

The solution is therefore just the constant term:

$$u(x,t) = 100$$

This makes physical sense: if the bar starts at a uniform temperature and its ends are insulated, the temperature will not change.


(4) Find u(x, t) for the initial condition f(x) = x

We use the same general solution form and apply the initial condition \(u(x,0) = f(x) = x\):

$$x = A_0 + \sum_{n=1}^{\infty} A_n \cos\left(\frac{n\pi x}{2}\right)$$

This requires finding the Fourier cosine series for \(f(x) = x\) on the interval \([0,2]\). The coefficients are:

$$A_0 = \frac{1}{2}\int_0^2 x\,dx = \frac{1}{2}\left[\frac{x^2}{2}\right]_0^2 = 1.$$
$$A_n = \frac{2}{2}\int_0^2 x \cos\left(\frac{n\pi x}{2}\right)dx = \frac{4}{n^2\pi^2}((-1)^n - 1)$$

This means \(A_n=0\) for even \(n\), and \(A_n = -\frac{8}{n^2\pi^2}\) for odd \(n\). Substituting these coefficients into the general solution for \(u(x,t)\):

$$u(x,t) = 1 + \sum_{n \text{ odd}} \left(-\frac{8}{n^2 \pi^2}\right)\cos\left(\frac{n\pi x}{2}\right) e^{-\alpha(n\pi/2)^2 t}$$

To write this as a single sum, we can use the index \(k\) where \(n = 2k-1\):

$$u(x,t) = 1 - \frac{8}{\pi^2} \sum_{k=1}^{\infty} \frac{1}{(2k-1)^2} \cos\left(\frac{(2k-1)\pi x}{2}\right)e^{-\alpha((2k-1)\pi/2)^2 t}$$

(5) Draw u(x, t) at different times

We will plot the partial sum of the solution from Q(4) up to \(n<10\) (which includes \(n=1,3,5,7,9\), so the sum runs from \(k=1\) to \(k=5\)). We set \(\alpha=1\). The function to plot is:

$$u_5(x,t) = 1 - \frac{8}{\pi^2} \sum_{k=1}^{5} \frac{1}{(2k-1)^2} \cos\left(\frac{(2k-1)\pi x}{2}\right) e^{-((2k-1)\pi/2)^2 t}$$

Description of the graphs:

  • t = 0.0: The exponential term is 1. The graph is a Fourier cosine series approximation of the initial condition \(f(x) = x\). It will be a line starting near \((0,0)\) and rising to near \((2,2)\).
  • t = 0.2: The terms with higher frequencies (larger \(k\)) decay faster due to the \((2k-1)^2\) term in the exponent. The graph becomes a smoother curve, still rising but flatter than the initial line.
  • t = 0.7: The decay is much more significant. The curve is now much flatter and getting closer to the steady-state temperature.
  • t = 2.0: All exponential terms in the sum are extremely small. The graph is now almost a flat horizontal line at the steady-state temperature.

The steady-state solution is the value as \(t \to \infty\). In this case, all exponential terms go to zero, and \(u(x,t) \to A_0 = 1\). This value represents the average of the initial temperature over the bar: \(\frac{1}{2}\int_0^2 x,dx = 1\).

The evolution of the temperature is shown in the plot. The temperature profile starts as the line \(u=x\), and as time progresses, heat redistributes within the insulated bar, causing the temperature to even out until it reaches a uniform steady state of \(u=1\).

Data for Plotting in Excel:

x u(x, 0.0) u(x, 0.2) u(x, 0.7) u(x, 2.0)
0.0 0.00 0.44 0.84 0.99
0.5 0.50 0.67 0.92 1.00
1.0 1.00 1.00 1.00 1.00
1.5 1.50 1.33 1.08 1.00
2.0 2.00 1.56 1.16 1.01

2.1.2 - General Education

General Education

3 - General Notes

General Notes

3.1 - Personal Mathematics

Mathematics