I am trying to solve an D-equation and do not know y[0], but I know y[x1]=y1.

I want to solve the DSolve only in the relevant xrange x=[x1, infinitny].

How could it work?

Attached the example that does not work

dsolv2 = DSolve[{y'[x] == c*0.5*t12[x, l2]^2 - alpha*y[x], y[twhenrcomesin] == zwhenrcomesin, x >= twhenrcomesin}, y[x], x]
dsolv2 = Flatten[dsolv2]
zsecondphase[x_] = y[x] /. dsolv2[[1]]

I am aware that DSolve does not allow the inequality condition but I put it in to explain you what I am looking for (t12[x,l2] will give me a value only depending on x since l2 is known).

EDIT

t12[j24_, lambda242_] := (cinv1 - cinv2)/(cop2 - cop1 + (h2*lambda242)*E^(p*j24));
cinv1 = 30; cinv2 = 4; cinv3 = 3; h2 = 1.4; h3 = 1.2; alpha = 0.04; z = 50; p = 0.06; cop1 = 0; cop2 = 1; cop3 = 1.3; teta2 = 0.19; teta3 =0.1; co2 = -0.6; z0 = 10;l2 = 0.1;
有帮助吗?

解决方案

What is wrong with this example?

t12[x_] := Exp[-x .01] Sin[x];
dsolv2 = Chop@DSolve[{y'[x] == c*0.5*t12[x]^2 - alpha*y[x], y[1] == 1}, y[x], x];
Plot[y[x] /. dsolv2[[1]] /. {alpha -> 1, c -> 1}, {x, 1, 100}, PlotRange -> Full]

enter image description here

Edit

Regarding your commentary:

Try using a piecewise function to restrict the domain:

t12[x_] := Piecewise[{{ Exp[-x .01] Sin[x], x >= 1}, {Indeterminate, True}}] ;
dsolv2 = Chop@DSolve[{y'[x] == c*0.5*t12[x]^2 - alpha*y[x], y[1] == 1}, y[x], x];
Plot[y[x] /. dsolv2[[1]] /. {alpha -> 1, c -> 1}, {x, 1, 100}, PlotRange -> Full]

其他提示

Your equation is first order and linear, so you can get a very general solution :

generic = DSolve[{y'[x] == f[x] - alpha*y[x], y[x0] == y0}, y[x], x]

Then you can substitute your specific term :

c = 1;
x0 = 1;
y0 = 1;
solution[x_] = generic[[1, 1, 2]] /. {f[x_] -> c*0.5*t12[x, l2]^2}   


Plot[solution[x], {x, x0, 100}]

Example

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top