Skip to main content

Differential Equation Solution (with Simulator)


Differential Equation Solution and Types of Differential Equations

Step-by-step explanation of solving a first-order linear differential equation and an overview of common differential equation types.

Solving the Differential Equation

Given differential equation:

$$\frac{dx}{dt} = 10 - 0.2x$$

1. Rearrange the equation

Move the \(x\) term to the left:

$$\frac{dx}{dt} + 0.2x = 10$$

This is a first-order linear differential equation of the form:

$$\frac{dx}{dt} + P(t)x = Q(t)$$

Here:

  • P(t) = 0.2
  • Q(t) = 10

2. Find the Integrating Factor

$$IF = e^{\int P(t)dt}$$

$$IF = e^{\int 0.2dt}$$

$$IF = e^{0.2t}$$

3. Multiply the equation by the integrating factor

$$e^{0.2t}\frac{dx}{dt} + 0.2e^{0.2t}x = 10e^{0.2t}$$

The left side becomes:

$$\frac{d}{dt}(xe^{0.2t}) = 10e^{0.2t}$$

4. Integrate both sides

$$\int \frac{d}{dt}(xe^{0.2t})dt = \int 10e^{0.2t}dt$$

Result:

$$xe^{0.2t} = 50e^{0.2t} + C$$

5. Solve for x

Divide by \(e^{0.2t}\):

$$x(t) = 50 + Ce^{-0.2t}$$

Final General Solution

$$x(t) = 50 + Ce^{-0.2t}$$

Interpretation: The value of \(x(t)\) approaches 50 over time because the term \(Ce^{-0.2t}\) decays to zero.

Types of Differential Equation Cases

Yes — there can be several other types of differential equation cases, including the one shown earlier (which is a first-order linear differential equation solved using an integrating factor).

Your example:

$$\frac{dx}{dt}=10-0.2x$$

Rewritten as:

$$\frac{dx}{dt}+0.2x=10$$

This is a first-order linear ODE.

1. Separable Differential Equations

If the equation can be written as:

$$\frac{dx}{dt}=f(t)g(x)$$

then we separate variables:

$$\frac{dx}{g(x)} = f(t)dt$$

Example:

$$\frac{dx}{dt}=tx$$

Separate variables:

$$\frac{1}{x}dx = tdt$$

Integrate:

$$\ln|x|=\frac{t^2}{2}+C$$

Solution:

$$x = Ce^{t^2/2}$$

2. Linear First-Order Differential Equation

This is exactly the case used earlier.

General form:

$$\frac{dx}{dt}+P(t)x=Q(t)$$

Solved using an integrating factor:

$$IF=e^{\int P(t)dt}$$

Example:

$$\frac{dx}{dt}+3x=6$$

3. Homogeneous Differential Equation

If the equation has the form:

$$\frac{dy}{dx}=F\left(\frac{y}{x}\right)$$

Substitute:

$$v=\frac{y}{x}$$

Example:

$$\frac{dy}{dx}=\frac{x+y}{x}$$

4. Exact Differential Equations

Form:

$$M(x,y)dx+N(x,y)dy=0$$

If

$$\frac{\partial M}{\partial y}=\frac{\partial N}{\partial x}$$

then the equation is exact.

Example:

$$ (2xy+3)dx + (x^2+4y)dy = 0 $$

5. Bernoulli Differential Equation

Form:

$$\frac{dy}{dx}+P(x)y=Q(x)y^n$$

Example:

$$\frac{dy}{dx}+y=xy^2$$

Solve using substitution:

$$v=y^{1-n}$$

6. Logistic Growth Equation

This is common in biology and population models.

Form:

$$\frac{dx}{dt}=rx\left(1-\frac{x}{K}\right)$$

Solution:

$$x(t)=\frac{K}{1+Ce^{-rt}}$$

7. Second-Order Differential Equations

Example:

$$\frac{d^2x}{dt^2}+3\frac{dx}{dt}+2x=0$$

Solve using the characteristic equation.

Your Equation Type

Your equation:

$$\frac{dx}{dt}=10-0.2x$$

This is also called a linear decay toward equilibrium model where:

  • Equilibrium value = 50
  • Rate constant = 0.2

Solution:

$$x(t)=50+Ce^{-0.2t}$$

Summary

Besides the linear first-order case, there are many other differential equation types:

  • Separable equations
  • Homogeneous equations
  • Exact equations
  • Bernoulli equations
  • Logistic equations
  • Higher-order differential equations

Further Reading 

  1.  Differential Equation Online Simulator

People are good at skipping over material they already know!

View Related Topics to







Contact Us

Name

Email *

Message *

Popular Posts

BER vs SNR for M-ary QAM, M-ary PSK, QPSK, BPSK, ...(MATLAB Code + Simulator)

Bit Error Rate (BER) & SNR Guide Analyze communication system performance with our interactive simulators and MATLAB tools. 📘 Theory 🧮 Simulators 💻 MATLAB Code 📚 Resources BER Definition SNR Formula BER Calculator MATLAB Comparison 📂 Explore M-ary QAM, PSK, and QPSK Topics ▼ 🧮 Constellation Simulator: M-ary QAM 🧮 Constellation Simulator: M-ary PSK 🧮 BER calculation for ASK, FSK, and PSK 🧮 Approaches to BER vs SNR What is Bit Error Rate (BER)? The BER indicates how many corrupted bits are received compared to the total number of bits sent. It is the primary figure of merit for a...

Constellation Diagrams of ASK, PSK, and FSK (with MATLAB Code + Simulator)

Constellation Diagrams: ASK, FSK, and PSK Comprehensive guide to signal space representation, including interactive simulators and MATLAB implementations. 📘 Overview 🧮 Simulator ⚖️ Theory 📚 Resources Definitions Constellation Tool Key Points MATLAB Code 📂 Other Topics: M-ary PSK & QAM Diagrams ▼ 🧮 Simulator for M-ary PSK Constellation 🧮 Simulator for M-ary QAM Constellation BASK (Binary ASK) Modulation Transmits one of two signals: 0 or -√Eb, where Eb​ is the energy per bit. These signals represent binary 0 and 1. BFSK (Binary FSK) Modulation Transmits one ...

DFTs-OFDM vs OFDM: Why DFT-Spread OFDM Reduces PAPR Effectively (with MATLAB Code)

DFT-spread OFDM (DFTs-OFDM) has lower Peak-to-Average Power Ratio (PAPR) because it "spreads" the data in the frequency domain before applying IFFT, making the time-domain signal behave more like a single-carrier signal rather than a multi-carrier one like OFDM. Deeper Explanation: Aspect OFDM DFTs-OFDM Signal Type Multi-carrier Single-carrier-like Process IFFT of QAM directly QAM → DFT → IFFT PAPR Level High (due to many carriers adding up constructively) Low (less fluctuation in amplitude) Why PAPR is High Subcarriers can add in phase, causing spikes DFT "pre-spreads" data, smoothing it Used in Wi-Fi, LTE downlink LTE uplink (as SC-FDMA) In OFDM, all subcarriers can...

Power Spectral Density Calculation Using FFT in MATLAB

📘 Overview 🧮 Steps to calculate the PSD of a signal 🧮 MATLAB Codes 📚 Further Reading Power spectral density (PSD) tells us how the power of a signal is distributed across different frequency components, whereas Fourier Magnitude gives you the amplitude (or strength) of each frequency component in the signal. Steps to calculate the PSD of a signal Firstly, calculate the fast Fourier transform (FFT) of a signal. Then, calculate the Fourier magnitude (absolute value) of the signal. Square the Fourier magnitude to get the power spectrum. To calculate the Power Spectral Density (PSD), divide the squared magnitude by the product of the sampling frequency (fs) and the total number of samples (N). Formula: PSD = |FFT|^2 / (fs * N) Sampling frequency (fs): The rate at which the continuous-time signal is sampled (in ...

ASK, FSK, and PSK (with MATLAB + Online Simulator)

📘 ASK Theory 📘 FSK Theory 📘 PSK Theory 📊 Comparison 🧮 MATLAB Codes 🎮 Simulator ASK or OFF ON Keying ASK is a simple (less complex) Digital Modulation Scheme where we vary the modulation signal's amplitude or voltage by the message signal's amplitude or voltage. We select two levels (two different voltage levels) for transmitting modulated message signals. Example: "+5 Volt" (upper level) and "0 Volt" (lower level). To transmit binary bit "1", the transmitter sends "+5 Volts", and for bit "0", it sends no power. The receiver uses filters to detect whether a binary "1" or "0" was transmitted. Fig 1: Output of ASK, FSK, and PSK modulation using MATLAB for a data stream "1 1 0 0 1 0 1 0" ( Get MATLAB Code ) ...

Online Simulator for ASK, FSK, and PSK

Try our new Digital Signal Processing Simulator!   •   Interactive ASK, FSK, and BPSK tools updated for 2025. Start Now Interactive Modulation Simulators Visualize binary modulation techniques (ASK, FSK, BPSK) in real-time with adjustable carrier and sampling parameters. 📡 ASK Simulator 📶 FSK Simulator 🎚️ BPSK Simulator 📚 More Topics ASK Modulator FSK Modulator BPSK Modulator More Topics Simulator for Binary ASK Modulation Digital Message Bits Carrier Freq (Hz) Sampling Rate (...

Power Distribution in Amplitude Modulation (AM)

Power Distribution In practice, the AM wave s(t) is a voltage or current signal. In either case, the average power delivered to a 1-ohm load resistor by s(t) is comprised of three components: Carrier power = (1/2) A c 2 Upper side-frequency power = (1/8)μ 2 A c 2 Lower side-frequency power = (1/8)μ 2 A c 2 The ratio of the total sideband power to the total power in the modulated wave is therefore equal to μ 2 / (2 + μ 2 ), which depends only on the modulation factor μ. If μ = 1, that is, 100% modulation is used, the total power in the two side-frequencies of the resulting AM wave is only one-third of the total power in the modulated wave. A major topic in Amplitude Modula...