MathGroup Archive 2005

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

Search the Archive

Re: a small problem from a newbee...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58210] Re: [mg58193] a small problem from a newbee...
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Thu, 23 Jun 2005 05:33:46 -0400 (EDT)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

Vzf[x_] := Evaluate[Simplify[y[x]/.
          DSolve[{y''[x]-g1*y[x]+g2*Cosh[k*x]/Cosh[k]+g3==0,
                y[-1]==0,y[1]==0},y[x],x][[1]]]];

Vzf[x]

(1/((1 + E^(2*Sqrt[g1]))*g1*(g1 - k^2)))*
  ((E^(Sqrt[g1]*x)*g3*(g1 - k^2) + E^(Sqrt[g1]*(x + 2))*g3*(g1 - k^2) + 
    E^(Sqrt[g1]*(2*x + 1))*(g3*k^2 - g1*(g2 + g3)) + E^Sqrt[g1]*(g3*k^2 - g1*
(g2 + g3)) + 
    E^(Sqrt[g1]*x)*(1 + E^(2*Sqrt[g1]))*g1*g2*Cosh[k*x]*Sech[k])/E^(Sqrt[g1]
*x))

Vzf[1]//Simplify

0

Vzf[-1]//Simplify

0


Bob Hanlon

> 
> From: dibyadeep at gmail.com
To: mathgroup at smc.vnet.net
> Date: 2005/06/22 Wed AM 01:55:36 EDT
> Subject: [mg58210] [mg58193] a small problem from a newbee...
> 
> hi ...i m writing a function in which i have to assign the solution of
> a ode to a variable..i wrote the function like this...but it doesnot
> work..cud u suggest a alternative...
> 
> Vzf=Function[x,DSolve[{y''[x] - g1*y[x] + g2*Cosh[k*x]/Cosh[k] +
>         g3 == 0, y[-1] == 0, y[1] == 0}, y, x]; Vz = y[x] /. %]
> 
> the program doesnot work bcoz thres no output wheni put a ; after
> solution to the ode...so the assignment doesnot work..
> plss help me out...i just cannot find a solution
> 
> 


  • Prev by Date: Re: a question about plot a list of functions.
  • Next by Date: Re: lists of variables
  • Previous by thread: Re: a small problem from a newbee...
  • Next by thread: a question about plot a list of functions.