I do not know what your y
there supposed to be (if it is a parameter, this is not a good name). If you use exact values, the errors go away. Since you are calling DSolve
always try to avoid non-exact parameters in your ode.
ClearAll[x, y, g]
c = 1;
b = 1/10;
sigma = 1/100;
n = 1;
w1 = -(1/3) - (2 Sqrt[g[x]])/(3*c)*Cos[y]
w2 = -((b*b)/(g[x])^(n - 1))*(1 + sigma)^n/(1 - g[x] + sigma)
ode = g'[x] == -2*g[x]*(1 - g[x] + sigma)*(w1 - w2) + sigma*g[x]*(1 + 3*w1);
DSolve[ode, g[x], x]
The solution is implicit.
Update:
If initial conditions for g(x)
is known, try NDSolve
. For example:
ClearAll[x, y, g]
y = 20 Degree;
c = 1;
b = 1/10;
sigma = 1/100;
n = 1;
w1 = -(1/3) - (2 Sqrt[g[x]])/(3*c)*Cos[y]
w2 = -((b*b)/(g[x])^(n - 1))*(1 + sigma)^n/(1 - g[x] + sigma)
ode = g'[x] == -2*g[x]*(1 - g[x] + sigma)*(w1 - w2) + sigma*g[x]*(1 + 3*w1)
sol = NDSolve[{ode, g[0] == 1}, g, {x, 0, 1}]
To plot:
Plot[Evaluate[g[x] /. sol], {x, 0, 1}, PlotRange -> All]