How to treat constants when solving differential equations

1.8k Views Asked by At

I have a bit of a confusion with how we treat constants in differential equations. Typically, when solving a differential equation of the form:

$$\frac{dQ}{dt} = k \ Q(t)$$

Then upon solving the differential equation:

$$\int \frac{dQ}{Q} = k \int dt$$

$$\ln{Q} + C_1 = kt + kC_2$$

$$\implies \ln{Q} = kt + C $$

$$\text{Here, we consider $kC_2 - C_1 =$ some arbitrary $C$}$$

$$\implies Q = \exp{(kt+C) = \exp{(kt)}\exp{(C)} = A\exp{kt}}$$

$$\text{Here, we then consider $\exp{(C)}$ as some arbitrary constant $A$}$$

This is okay with me, but then; when solving a different differential equation, for instance:

$$\frac{dQ}{dt} = \frac{3}{2} - \frac{Q}{3}$$ $$\implies \ln{\left(\frac{3}{2} - \frac{1}{3}Q\right)} = -\frac{1}{3}t + C$$ I cannot then do this, using the logic I've developed from the first example:

$$\frac{-1}{3}Q = A\exp{\left(\frac{-t}{3}\right)}- \frac{3}{2}$$ $$\implies Q = A\exp{\left(\frac{-t}{3}\right)} + \frac{1}{2}$$

As, since $Q(0) = 50$ is given to me:

$$\implies A = 49.5$$

Where, in the solution from my lecturer:

$$A = |\frac{3}{2} - \frac{50}{3}| \implies A = \frac{91}{6}$$

Just for clarity, here is the exact exercise where this confusion comes from:

enter image description here

So basically, I seem to have made a mistake using the whole "don't worry about the constant, raising it to be powers or multiplying it by other constants doesn't stop it from being completely arbitrary" argument seemed to fail me here; and I'm wondering why not.

3

There are 3 best solutions below

1
On BEST ANSWER
  1. There is a typo in your development, $\frac92$, not $\frac12$.

  2. After fixing, you find $A=\frac{91}2$ which is the triple of the lecturer's value. But as you don't tell us what meaning $A$ has for the lecturer, it is impossible to point the error.

0
On

To make things simple, considering $$\frac{dQ}{dt} = \frac{3}{2} - \frac{Q}{3}$$ let $$y=\frac{3}{2} - \frac{Q}{3}\implies Q=\frac{9}{2}-3 y\implies \frac{dQ}{dt}=-3\frac{dy}{dt}$$ So, the equation is $$-3\frac{dy}{dt}=y\implies \frac{dy}{y}=-\frac 13 dt$$ So $$\log(y)=-\frac t3 +A\implies y=e^{-\frac t 3+A}=B\,e^{-\frac t 3}$$ Back to $Q$ $$Q=\frac 92-3B\,e^{-\frac t 3}=\frac 92+C\,e^{-\frac t 3}$$

For $t=0$, you have $Q=50$; so $$50=\frac 92+C\implies C=50-\frac 92=\frac{91} 2 \implies Q=\frac{91 }{2}e^{-t/3}+\frac{9}{2}$$

Is this better for you ?

0
On

This is a first Order Non-homogeneous differential equation. We have

$$\frac{dQ}{dt} = \frac{3}{2} - \frac{Q}{3} \quad (*)$$

where $ \frac{3}{2}$ is the constant. I can be solved by applying the method of variation of constants. We first have to solve the homogeneous differential equation.

$\frac{dQ}{dt} = - \frac{Q}{3}$

$\frac1Q \ dQ=-\frac13 \ dt$

$\ln(Q)=-\frac{t}3+c$

$Q_h=C\cdot e^{-\frac{t}3}$

$Q_I=C(t)\cdot e^{-\frac{t}3}$

Differentiate w.r.t. t

$Q_I'=C'(t)\cdot e^{-\frac{t}3}-C(t)\cdot \frac13e^{-\frac{t}3}$

Inserting the terms for $Q_I$ and $Q_I'$ in $(*)$

$C'(t)\cdot e^{-\frac{t}3}-C(t)\cdot \frac13e^{-\frac{t}3}=\frac32-\frac13\cdot C(t)\cdot e^{-\frac{t}3}$

$C'(t)\cdot e^{-\frac{t}3}=\frac32$

$C'(t)=\frac32 \cdot e^{\frac{t}3}$

$C(t)=\frac92 \cdot e^{\frac{t}3}$

The solution is the sum of the homogeneous solution and the non-homogeneous solution

$Q(t)=C\cdot e^{-\frac{t}3}+\frac92$