Question: How to solve the differential equation with piecewise function

I want to solve a differential equation with piecewise function, but I face an error. I am wondering how to handle it. Thanks

t[1]:=1

x := t -> piecewise(0 <= t and t < t[1], -60*t + 100, t[1] <= t and t <= 10, 1.645*sqrt(480*t))

dsolve({diff(p(t), t) = 2*h*x(t), p(T) = 0}, p(t))

and the error is :

"Error, (in dsolve) found the following equations not depending on the unknowns of the input system: {pT = 0}"

t[1] := 1.05

1.05

(1)

x := proc (t) options operator, arrow; piecewise(0 <= t and t < t[1], -60*t+100, t[1] <= t and t <= 10, 1.645*sqrt(480*t)) end proc

proc (t) options operator, arrow; piecewise(0 <= t and t < t[1], -60*t+100, t[1] <= t and t <= 10, 1.645*sqrt(480*t)) end proc

(2)

dsolve({p*T = 0, diff(p(t), t) = 2*h*x(t)}, p(t))

Error, (in dsolve) ambiguous input: the variables {p} and the functions {p(t)} cannot both appear in the system

 

``

Download Error.mw

Please Wait...