Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to plot this function??

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127074] Re: How to plot this function??
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Thu, 28 Jun 2012 04:03:24 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201206270812.EAA18725@smc.vnet.net>

f[t_, hss_, a_] = Piecewise[{
    {h[t] /. DSolve[
        {h'[x] == (hss - h[x])/a, h[10] == hss}, h, x][[1]],
     t < 10}},
   h[t] /. DSolve[
      {h'[x] == (2 hss - h[x])/a, h[10] == hss}, h, x][[1]]] //
  Simplify

Piecewise[{{hss, t < 10}}, (2 - E^((10 - t)/a))*hss]


Assuming[{a > 0}, Simplify[f[Infinity, hss, a]]]

2 hss


Plot[f[t, 2.1153, 5], {t, 0, 40},
 PlotStyle -> Darker[Red],
 Frame -> True, Axes -> False]


Bob Hanlon


On Wed, Jun 27, 2012 at 4:12 AM, Phoenix <mirko.tavano at live.com> wrote:
> Hi. I have to plot this function:
>
> F[t_] := {
>  If[t < 10, hSP = hss, hSP = 2*hss];
>  DSolve[{h'[x] == (hSP - h[x])/A, h[10] == hss}, h, x]
>  }
>
> The output is:
> t<10) {{{h -> Function[{x}, 2.1153]}}}
> t>10) {{{h -> Function[{x}, E^(-0.2 x) (-15.6301 + 4.2306 E^(0.2 x))]}}}
>
>
> How can I plot this function in the same graph?
> Please help me!
>



  • Prev by Date: Re: LibraryLink & MinGW
  • Next by Date: Re: Approximate Zero Times A Symbol
  • Previous by thread: How to plot this function??
  • Next by thread: P controller