1 L1: Applic. leading to diffeq
1.1 What is a differential equation?
A differential equation is an equation relating an unknown function and any of its derivatives or differentials
1.2 Example: Growth and Decay
Model \[\boxed{y'=ay}\]
Initial Condition (i.c.): \[y(0)=y_0\]
Question: How the value of \(a\) affect the solution?
# Load the plotly library
library(plotly)
# Initial data setup
y0 <- 100
t <- seq(0, 10, length.out = 100)
a1 <- 1
y1 <- y0 * exp(a1 * t)
# Create the plot for exponential growth
plot_ly(x = t, y = y1, type = 'scatter', mode = 'lines',
        name = 'Exponential Growth (a > 0)',
        line = list(color = 'blue')) %>%
    layout(title = 'Exponential Growth (a > 0)',
           xaxis = list(title = 'Time'),
           yaxis = list(title = 'y'))Note: You want to see a video example? Click here: Section 1.10
1.3 Example: Newton’s law of cooling
\[\boxed{\frac{dT}{dt}=-k(T-T_{env})}\quad T(0)=T_0;\quad k>0\]
library(plotly)
# Define initial parameters
T0 <- 1000
Tenv <- 300
k <- 1
t <- seq(0, 10, length.out = 100)
# Function to generate plot with hover text
generate_plot <- function(T0, Tenv) {
  y <- Tenv + (T0 - Tenv) * exp(-k * t)
  
  # Create a text vector for hover information
  hover_text <- paste("Time:", round(t, 2), "<br>Temp:", round(y, 2))
  plot_ly(x = ~t, y = ~y, type = 'scatter', mode = 'lines', text = ~hover_text, hoverinfo = 'text') %>%
    layout(title = paste("Temperature Convergence (T0 =", T0, ", Tenv =", Tenv, ")"),
           xaxis = list(title = 'Time'),
           yaxis = list(title = 'Temperature'))
}
# Generate and display the plot
generate_plot(T0, Tenv)1.4 Newton’s Second Law
“Force is equal to the rate of change of momentum” \[\boxed{F=\frac{d}{dt}(mv)}\] If mass is constant then \(F=m\frac{dv}{dt}=ma\)
\[\begin{align} \frac{d^2x}{dt^2}&=\frac{F(t)}{m}\\ \text{Integrating:}\\ v(t)&=v_0+\frac{1}{m}\int_0^t F(\tau)d\tau \end{align}\]
1.5 Definition to be a solution of diffyeq
A function \(y(x)\) is said to be a solution to a differential equation \(\Leftrightarrow\) an identity results when the corresponding values for \(y(x)\) and its derivatives are substituted into the equation.
1.5.1 Example
Verify that \(y=e^x+x+7\) is a solution to \[\frac{dy}{dx}-y+x=-6\]
😁
1.6 Explicit and Implicit form of a solution
- A solution is in an explicit form\(\Leftrightarrow y=f(x)\)
- A solution is in an implicit form\(\Leftrightarrow f(x,y)=0\)
1.7 Is the sol. of a diffeq always unique?
A: No
\[\frac{d^2y}{dx^2}+y=0\]
By inspection we observe that two different functions satisfy:
\[\begin{align} y_1&=\cos x\\ y_2&=\sin x\\ \end{align}\]Therefore the most General Solution is a Linear Combination of the particular solutions:
\[ \boxed{y = C_1\cos x + C_2\sin x }\]
1.8 Does every diffeq have a sol\(^\underline{n}\) ?
A: No
\[\left(\frac{dy}{dx}\right)^2+1=0\]
Any solution to this eq\(^\underline{n}\) would have an imaginary slope!
Thus no-real solution!2
1.9 Have questions ?
Schedule Office Hours with your Instructor Here!
1.10 References
- Exponential growth and decay. https://en.wikipedia.org/wiki/Exponential_growth
- Newton law of cooling. https://en.wikipedia.org/wiki/Newton%27s_law_of_cooling
- Harmonic oscillator. https://en.wikipedia.org/wiki/Harmonic_oscillator
- Khan: Modeling population with simple differential equation. https://youtu.be/IYFkXWlgC_w?feature=shared
- interested in imaginary? \(\Rightarrow\) PHY:455https://syllabi.oru.edu/?id=28002↩︎