Re: DSolve on 'simple' differential equations

*To*: mathgroup at smc.vnet.net*Subject*: [mg114627] Re: DSolve on 'simple' differential equations*From*: schochet123 <schochet123 at gmail.com>*Date*: Sat, 11 Dec 2010 01:51:58 -0500 (EST)*References*: <idhjfa$9gv$1@smc.vnet.net>

The expression returned by DSolve really is the solution. For an ODE F[t, u[t], u'[t], u''[t]]==0, an expression E[t, u[t], u'[t]] that is constant along each solution is called a first integral, and is not a solution, although we humans may informally refer to it as one. However, depending on what we want to know, it may be more useful to have the formula for a first integral than the formula for the solutions. We might hope that Mathematica could show the steps by which it solves problems, and in particular show us the first integral. However, as discussed several times in this group, the methods Mathematica uses are designed to be very general rather than to be easily followed by humans. In order to obtain the steps a human would use to solve easy problems, it is necessary to write a program. Fortunately, there is a standard procedure for obtaining a first integral from the general solution: firstintegral[ode_,depvar_,indepvar_]:=Module[{usub, sol, t, c2sub, c1sub}, usub=DSolve[ode,depvar, indepvar]; sol[t_]=depvar[t] /. usub[[1]]; c2sub=Solve[depvar[indepvar] == sol[indepvar], C[2]]; c1sub=Solve[depvar'[indepvar] == sol'[indepvar] /. c2sub[[1]], C[1]]; C[1]/. c1sub[[1]]] Caveat: This simple program will fail if the constants are buried too deeply inside integrals, since Solve does not succeed in such cases. Steve On Dec 6, 4:57 am, Oliver Jennrich <oliver.jennr... at gmx.net> wrote: > Hi, > > I'm sure that I'm missing something obvious, but I try to get > Mathematica to solve the following differential equation: > > deq = 2*Derivative[1][r][t]*Derivative[1][\[Phi]][t] + > r[t]*Derivative[2][\[Phi]][t] == 0 > > (or in short: 2 r' phi' + r phi'' = 0) > > The solution is well known - multiply with r and find that the equation > is equivalent to > > (r^2 phi')' = 0 > > with the solution > > r^2 phi' = const. > > Mathematica sort of 'oversolves' the problem: I always get a solution of = the form > > {{\[Phi][t] -> C[2] + Integrate[C[1]/r[K[1]]^2, {K[1], 1, t}]}} > > which is correct (of course) but misses the point. > > DSolve[deq, \[Phi]'[t], t] > > yields the same result as above (why?). > > So is there a way to have Mathematica solve the diff.eq. in terms of > phi'? Of course, I can manually replace phi'-> u and phi''-> u', but > that is somewhat tedious. > > -- > Space - The final frontier

**Re: Replacement Rule with Sqrt in denominator**

**Re: Replacement Rule with Sqrt in denominator**

**DSolve on 'simple' differential equations**

**Counting number of numbers in a large list between two valus**