Apologies for the basic question.

I am trying to solve this differential equation for $w(t)$ as a function of $q(t)$: $$ \frac{dw(t)}{dt} = \mu_v \frac{R_{on}}{\delta} \frac{dq(t)}{dt}. $$ Solving with DSolve works fine:

DSolve[D[w[q[t]], t] == (Subscript[μ, v] Subscript[R, on])/ δ q'[t],
 w[q[t]], q[t]]
(* {{w[q[t]] -> C[1] + (q[t] Subscript[R, on] Subscript[μ, v])/δ}} *)

My question is how to impose the boundary condition $q = 0 \implies w = \delta/2$. The naive approach gives me an error:

DSolve[{D[w[q[t]], t] == (Subscript[μ, v] Subscript[R, on])/ δ q'[t],
 w[0] == δ/2}, w[q[t]], q[t]]

Function: parameter specification {q[t]} in Function[{q[t]}, δ/2] should be a symbol or a list of symbols.

  • $\begingroup$ One problem is mathematical: If $w(t) = \sin t$ and $q(t) = t^2$, then $w(q(t)) = \sin t^2 \ne w(t)$. Thus D[w[q[t]], t] does not represent $dw(t)/dt$. I'm not entirely sure what you wanted, but given your first solution being "fine," perhaps this?: DSolve[{D[w[q[t]], t] == (Subscript[\[Mu], v] Subscript[R, on])/\[Delta] q'[t], w[0] == \[Delta]/2} /. t -> InverseFunction[q][q], w[q], q] $\endgroup$ – Michael E2 Nov 18 '20 at 14:52
  • $\begingroup$ Yes good point. Perhaps I am barking up the wrong tree here, DSolve might just be the wrong tool. I have a relation between the time derivatives of $w$ and $q$ given by the equation in the question, and I want to integrate both sides with respect to time to get a relation between $w$ and $q$. What I meant by "fine" is that it gives me the right relation, but perhaps for the wrong reasons given my derivative of $w$ doesn't make sense... anyway, your solution does give me the answer I was expecting. I'm a little puzzled by the substitution of $t$ for $q^{-1}(q)$ though to be honest. $\endgroup$ – chaffdog Nov 18 '20 at 15:32
  • $\begingroup$ $q=q(t) \Leftrightarrow t = q^{-1}(q)$, abusing notation to treat $q$ as both a variable and a function. $\endgroup$ – Michael E2 Nov 18 '20 at 15:58

I'm not entirely sure what you want, but given your first solution being "fine," perhaps this?:

 {D[w[q[t]], t] == (Subscript[μ, v] Subscript[R, on])/δ q'[t],
  w[0] == δ/2} /. t -> InverseFunction[q][q],
  w[q], q]

InverseFunction::ifun: Inverse functions are being used. Values may be lost for multivalued inverses.

{{w[q] -> (δ^2 + 2 q Subscript[R, on] Subscript[μ, v])/(2 δ)}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.