0
$\begingroup$

Please suggest how to solve below linear ODE (I want to plot the r vs t graph), I am trying using Integrate:

    f[r_]: = A0/r^3; A0=10^-10;μ = 0.001; b = 4*Pi*a*μ;a=2*10^-6;
    f[r] + b*r'[t] == 0
    Integrate[1/f[r], r] + Integrate[1/b, t] == c0
     
  data = {{7.*10^-6, -0.317175}, {7.7*10^-6, -2.59621}, {8.4*10^-6, 
  \
  -4.03621}, {9.1*10^-6, -4.79394}, {9.8*10^-6, -5.0422}, 
  {0.0000105, \
 -4.94287}, {0.0000112, -4.63177}, {0.0000119, -4.21503}, 
 {0.0000126, \
 -3.76242}, {0.0000133, -3.32148}, {0.000014, -2.91612}, 
   {0.0000147, 
 \
-2.55617}, {0.0000154, -2.24334}, {0.0000161, -1.97411}, 
 {0.0000168, \
  -1.74391}, {0.0000175, -1.5469}, {0.0000182, -1.37765}, 
 {0.0000189, \
  -1.232}, {0.0000196, -1.10604}, {0.0000203, -0.996608}, 
 {0.000021, \
   -0.901123}, {0.0000217, -0.817417}, {0.0000224, -0.743742}, \
  {0.0000231, -0.678649}, {0.0000238, -0.620934}, {0.0000245, \
  -0.569525}, {0.0000252, -0.523687}, {0.0000259, -0.48258}, \
  {0.0000266, -0.445732}, {0.0000273, -0.412469}, {0.000028, 
   -0.382433}};

  f0 = Interpolation[N[data], InterpolationOrder -> 3];
  f[r_] = f0[r]
     
$\endgroup$
7
  • $\begingroup$ Rp is not defined ?.Your function is: z[r] or: z[t] ? Decide ? $\endgroup$ Feb 10, 2023 at 17:08
  • $\begingroup$ Function definitions are written: z[r_] ... $\endgroup$ Feb 10, 2023 at 19:50
  • $\begingroup$ @Iwaniuk, I have updated the question and corrected the typo Rp. $\endgroup$ Feb 11, 2023 at 4:40
  • $\begingroup$ What is fc[r]? IS it supposed to be c f[r]? $\endgroup$
    – bmf
    Feb 19, 2023 at 3:51
  • $\begingroup$ @bmf it was typo. Updated it. $\endgroup$ Feb 19, 2023 at 3:59

1 Answer 1

1
$\begingroup$

I don't really understand what the issue is here. Mathematica is happy to DSolve it, unless I am missing something

f[r_] := A0/r[t]^3; 
A0 = 10^-10; 
μ = 0.001; 
b = 4*Pi*a*μ; 
a = 2*10^-6;
ode = f[r] + b*r'[t] == 0;

DSolve[ode, r[t], t] // Rationalize[#, 0] &

dsolve

$\endgroup$
3
  • $\begingroup$ Ok, If I have interpolated data for f(r) then how we can get the solution? updated the question. $\endgroup$ Feb 19, 2023 at 4:05
  • $\begingroup$ @GopalVerma Then you do NDSolve for the numerical solution. $\endgroup$
    – bmf
    Feb 19, 2023 at 4:06
  • $\begingroup$ I tried but was not able to get the solution. $\endgroup$ Feb 19, 2023 at 4:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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