Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'DSolve Piecewise Replacement' topicStudent Support Forum > General > Archives > "DSolve Piecewise Replacement"

Next Comment >Help | Reply To Topic
Author Comment/Response
DSolve Piecewise Replacement
05/16/12 10:54am

Hello! I just started using Mathematica two days ago. I'm having some trouble with the following:

I have two differential equations, where I want to use the solution of the first one to solve the second one.

Then I get errors regarding replacement . I've spent a lot of time trying and failing and I thought it was time two ask for help.

The input is as follows and I use Wolfram 8 Trial version.


wallThickness = 0.2
wallArea = 2.2*2.2

c1 = c2 = 1.1
v1 = v2 = wallArea*4.4
p1 = p2 = 1.15

emissivity = 0.9
stefan = 5.6704*10^(-8)

hAir = 100
kWall = 10^(-1.4)

R1 = R3 = 1/(hAir*wallArea)
R2 = wallThickness/(kWall*wallArea)
R = 6 (R1 + R2 + R3)

a = p1*v1*c1
b = p2*v2*c2

fullyTime = 358.4
decayTime = 636
extTime = 1100

growCoef = 0.0029
decayCoef = 0.00003

grow[t_] = growCoef*t^2
fully[t_] = grow[fullyTime]
decay[t_] = grow[fullyTime]*Exp[-((t - decayTime)^2)*decayCoef]

heatRate[t_] = 2*1000*Piecewise[{
{grow[t], 0 <= t < fullyTime},
{fully[t], fullyTime <= t < decayTime},
{decay[t], decayTime <= t < extTime}
}]

Plot[heatRate[t], {t, 0, 1100}]

heat[t_] = Integrate[heatRate[t], t]
Plot[heat[t], {t, 0, 1100}]

sol1 = DSolve[{Derivative[1][q][t] + q[t]/(R*b) == (
heat[t] - 5*q[t])/(R*a), q[0] == 0}, q, t]
Plot[q[t]/1000 /. sol1, {t, 0, 1100}]

j = q[t] /. sol1[[1]];

sol2 = DSolve[{Derivative[1][w][t] = j - w[t]/(6*R*b), w[0] == 0}, w,
t]
Plot[Evaluate[q[o] /. sol2], {o, 0, 1100}]

URL: ,

Subject (listing for 'DSolve Piecewise Replacement')
Author Date Posted
DSolve Piecewise Replacement DSolve Piece... 05/16/12 10:54am
Re: DSolve Piecewise Replacement Bill Simpson 05/17/12 1:12pm
Re: DSolve Piecewise Replacement Peter Pein 05/20/12 07:40am
Next Comment >Help | Reply To Topic