> restart;
> ode:=abs(x)*diff(y(x),x)+(x-1)*y(x)-x^3=0;
ode :=|x|(∂x∂ y(x)) + (x−1) y(x)−x3= 0
> sol:=dsolve(ode);
sol:= y(x) = ((
x3e(−x)+ 3x2e(−x)+ 6x e(−x)+ 6e(−x) x≤0
x ex−ex+ 7 0< x) + C1)e
−
ln(x)−x x≤0 x−ln(x) 0< x
> f1:= unapply(op(2,sol),x);
f1 :=x→(
piecewise(x≤0, x3e(−x)+ 3x2e(−x)+ 6x e(−x)+ 6e(−x),0< x, x ex−ex+ 7) + C1 )e(−piecewise(x≤0,ln(x)−x,0<x, x−ln(x)))
> limit(f1(x),x=0,right);
> limit(f1(x),x=0,left);
0
−signum(C1 + 6)∞
> g1:= unapply(f1(x),x,_C1);
g1 := (x, C1)→(
piecewise(x≤0, x3e(−x)+ 3x2e(−x)+ 6x e(−x)+ 6e(−x),0< x, x ex−ex+ 7) + C1 )e(−piecewise(x≤0,ln(x)−x,0<x, x−ln(x)))
> plot([g1(x,c1) $c1=-3..3],x=-5..5,y=-10..10);
–10 –8 –6 –4 –2 2 4 6 8 10
y
–4 –2 2 4
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+ 3x+ 6 + 6
x+exb 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 fn :=x→x2+ 3x+ 6 + 6
x+exb 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+ 3x+ 6 + 6 x+exb
x )
–10 –8 –6 –4 –2 2 4 6 8 10
y
–4 –2 2 4
x
–10 –8 –6 –4 –2 2 4 6 8 10
y
–4 –2 2 4
x
> 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+ 3x+ 6 + 6 x−6ex
x )
> limit(f2(x),x=0,left);
0
> plot([g2(x,a) $a=-3..3],x=-5..5,y=-2..10);
–2 0 2 4 6 y
–4 –2 2 4
x
> 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);
0 2 4 6 8 10
y
–4 –2 2 4
x