>
restart; ode:=abs(x)*diff(y(x),x)+(x-1)*y(x)-x^3=0;
>
∂ y(x)) + (x − 1) y(x) − x3 = 0 ode := |x| ( ∂x sol:=dsolve(ode);
>
sol := y(x) = 3 (−x) + 3 x2 e(−x) + 6 x e(−x) + 6 e(−x) (( x ex x e − ex + 7 > f1:= unapply(op(2,sol),x);
x ≤ 0 ) + C1 ) e 0 limit(f1(x),x=0,left);
>
0 −signum( C1 + 6) ∞ g1:= unapply(f1(x),x,_C1);
g1 := (x, C1 ) → ( piecewise(x ≤ 0, x3 e(−x) + 3 x2 e(−x) + 6 x e(−x) + 6 e(−x) , 0 < x, x ex − ex + 7) + C1 )e(−piecewise(x≤0, ln(x)−x, 0 plot([g1(x,c1) $c1=-3..3],x=-5..5,y=-10..10); 10
8
6 y 4
2
–4
–2
2 –2
–4
–6
–8
–10
x
4
> >
odep:=x*diff(y(x),x)+(x-1)*y(x)-x^3=0; oden:=-x*diff(y(x),x)+(x-1)*y(x)-x^3=0; ∂ y(x)) + (x − 1) y(x) − x3 = 0 odep := x ( ∂x
> >
∂ oden := −x ( ∂x y(x)) + (x − 1) y(x) − x3 = 0 solp:=dsolve({odep,y(1)=exp(-1)*a}); soln:=dsolve({oden,y(-1)=-2-exp(-1)*b});
solp := y(x) = x2 − x + x e(−x) a soln := y(x) = x2 + 3 x + 6 +
6 ex b + x x
> > >
fp := unapply(op(2,solp),x); fn := unapply(op(2,soln),x); f2:= x -> piecewise(x>0,fp(x),fn(x));
> > >
fp := x → x2 − x + x e(−x) a 6 ex b fn := x → x2 + 3 x + 6 + + x x f2 := x → piecewise(0 < x, fp(x), fn(x)) g1bis := unapply(f2(x),x,a,b); plot([g1bis(x,2,b) $b=-8..-2],x=-5..5,y=-10..10); plot([g1bis(x,a,0) $a=-3..3],x=-5..5,y=-10..10);
g1bis := (x, a, b) → piecewise(0 < x, x2 − x + x e(−x) a, x2 + 3 x + 6 + 10
8
6 y 4
2
–4
–2
2 –2
–4
–6
–8
–10
x
4
6 ex b + ) x x
10
8
6 y 4
2
–4
–2
2
x
4
–2
–4
–6
–8
–10
> >
limit(f2(x),x=0,right); limit(f2(x),x=0,left);
> >
0 −signum(b + 6) ∞ b:=solve(limit(f2(x),x=0,left)=0,b); g2:= unapply(f2(x),x,a); b := −6
g2 := (x, a) → piecewise(0 < x, x2 − x + x e(−x) a, x2 + 3 x + 6 + >
limit(f2(x),x=0,left);
>
0 plot([g2(x,a) $a=-3..3],x=-5..5,y=-2..10);
6 6 ex − ) x x
10
8
6 y 4
2
–4
–2
0
2
x
4
–2
> >
dfp:= x -> diff(fp(x),x); dfn:= x -> diff(fn(x),x); dfp := x → diff(fp(x), x)
>
dfn := x → diff(fn(x), x) a:=solve(limit(dfp(x),x=0)=limit(dfn(x),x=0),a); a := 1 c1:= x->g2(x,a);
>
c1 := x → g2(x, a) plot(c1(x),x=-5..5,y=0..10);
>
10
8
6
y
4
2
–4
–2
0
2
x
4