MathGroup Archive 2005

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

Search the Archive

Union of Piecewise Functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55695] Union of Piecewise Functions
  • From: Pratik Desai <pdesai1 at umbc.edu>
  • Date: Sun, 3 Apr 2005 05:51:05 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hello All,

I am trying to compute a series solution for a PDE with a jump 
discontinuity in the domain (Wave equation for a string with a damper 
collocated inside the domain 0<x<l). Briefly,  I am trying to accomplish 
these tasks:

I have series solution for the part 0<x<d
resp1[x_,t_,n_]:=Total[(1/sec3[n])*phig[x,n]*An1[t,n]]+Total[(1/Conjugate[sec3[n]])*phigc[x,n]*An2[t,n]]//Chop
where
An1[t] is obtained by solving a first order ode in terms of time
expr1=an'[t]-lamda*an[t];
sol1=DSolve[expr1==UnitStep[t],an,t]/.{C[1]->0};
phig1[x,n] is my spatial eigenfunction say Sin[n*pi*x/L]
sec3[n] is  some scaling (fouirer) coefficient (not a function of x, 
ignorable for the present purpose )


Similarly for d<x<l
resp2[y_,t_,n_]:=Total[(1/sec4[n])*phig[(l-x),n]*An1[t,n]]+Total[(1/Conjugate[sec4[n]])*phigc[(l-x),n]*An2[t,n]]//Chop

At d

respd[d_,t_,n_]=Total[(1/sec3[n])*y[d]*An1[t,n]]+Total[(1/Conjugate[sec3[n]])*y[d]*An2[t,n]]//Chop

Now I am trying to find the complete response by using Union,

resp[x_,y_,t_,n_]:=Union[resp1[(x-d),t,n],respd[d,t,n],resp2[y,t,n]] 
(*not sure about this*)
d=0.4 (*assume*)
m=3
Table[resp[x,y,t,n],{x,0,0.7,0.1},{y,0.7,1,0.1},{t,0,10,1},{n,1,m,1}]

is there a better way to accomplish this, any ideas will be greatly 
appreciated. I would like to plot these for different values of t to 
check for convergence.

Thanks again,

Best Regards,

Pratik Desai


  • Prev by Date: file corrupted
  • Next by Date: Re: Happy with v. 5.1.1. --- NMinimize, and MathOptimizer Professional
  • Previous by thread: Re: file corrupted
  • Next by thread: How do I remove operator status?