Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #11034 > unrolled thread

Re: How to Scale and vary plot for a Differential Equation

Started byRahul Chakraborty <rahul.6sept@gmail.com>
First post2012-07-22 08:29 +0000
Last post2012-07-22 08:29 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: How to Scale and vary plot for a Differential Equation Rahul Chakraborty <rahul.6sept@gmail.com> - 2012-07-22 08:29 +0000

#11034 — Re: How to Scale and vary plot for a Differential Equation

FromRahul Chakraborty <rahul.6sept@gmail.com>
Date2012-07-22 08:29 +0000
SubjectRe: How to Scale and vary plot for a Differential Equation
Message-ID<jugdlr$emf$1@smc.vnet.net>
Dear Bob,

 Thanks.

But one query, why it is required to use Log   in " Log[D[x[t] /. sol,
t]". Because in simple plot without Manipulate it is not required.


 Regards,
 rc

On 7/21/12, Bob Hanlon <hanlonr357@gmail.com> wrote:
> You appear to be confusing the syntax of DSolve with that of NDSolve.
> DSolve can be used to solve the DE once rather than repeatedly inside
> the manipulate.
>
> DSolve[{x'[t] - r x[t] (1 - x[t]/K) == 0,
>     x[0] == 1/2}, x[t], t][[1]] // Quiet
>
> {x[t] -> (E^(r*t)*K)/(-1 + E^(r*t) + 2*K)}
>
> Manipulate[
>  Module[{sol},
>   sol = {x[t] -> (E^(r*t)*K)/(-1 + E^(r*t) + 2*K)};
>   ParametricPlot[
>    Evaluate[{
>      x[t] /. sol,
>      Log[D[x[t] /. sol, t]]}],
>    {t, 0, 50},
>    Frame -> True,
>    Axes -> False,
>    FrameLabel -> {"x", Log[Overscript[x, "."]]},
>    AspectRatio -> 1,
>    PlotRange -> {{0, 5.1}, {-6, 2.1}}]],
>  {{r, 1}, 1, 5, 0.01, Appearance -> "Labeled"},
>  {{K, 1}, 1, 5, 0.01, Appearance -> "Labeled"}]
>
>
> Bob Hanlon
>
>
> On Fri, Jul 20, 2012 at 3:48 AM, Rahul Chakraborty
> <rahul.6sept@gmail.com> wrote:
>> Dear all,
>>
>> Kindly guide me for the above mentioned subject. I did try to code it but
>> needs guidance.The code as below
>>
>> Clear[x];
>> k[x_]=Manipulate[DynamicModule[{r:=1,K:=1},{Slider[Dynamic[r]],Slider[Dynamic[K]]},eqn=x'[t]-r
>> x[t]
>> (1-x[t]/K)==0//Quiet,sol=First@DSolve[{eqn,x[0]==1/2},x[t],{t,0,50}],[ParametricPlot[Evaluate[{x[t]/.sol,D[x[t]/.sol,t]}],{t,0,50},Frame->True,AxesLabel->{"x",Overscript[x,"."]},AspectRatio->1],ImageSize->
>> Scaled[r,K]],{r,1,5},{K,1,5},Initialization:>
>> {r:=1,K:=1},SaveDefinitions-> True]]
>>
>> Regards,
>> rahul
>>
>

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web