# The wave equation

In this chapter, we are going to solve numerically the wave equation. Unlike the previous equations we've been solving, this is a partial differential equation. For this new kind of equations, we are going to learn new methods, such as the method of lines.

Lets start by defining the problem for the 1 dimensional wave equation. We are trying to find a function f which depends of one spatial coordinate x and one temporal coordinate. All we know about f is that it satisfies the wave equation:

$$
\frac{\partial^2f}{\partial x^2} = \frac{1}{v^2}\frac{\partial^2f}{\partial t^2}
$$

and that it satisfies the following initial conditions:

$$
\begin{align}f(x,t=0) &= g(x)\nonumber\ \frac{\partial f}{\partial t}(x,t=0) &= h(x) \nonumber \end{align}
$$

In the following sections, we are going to show ways in which one can approximate the value of this function in a discrete domain.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://servicio-social.gitbook.io/computational-physics/the-wave-equation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
