# Coupled differential equations

I have

pde1 = -y1''[x] - (2*y1'[x])/x + ((y1[x])^3 + y2[x])*y1[x] == 0;
pde2 = y2''[x] + (2*y2'[x])/x - (y1[x])^3 == 0
sol = NDSolve[{pde1, pde2, y1[1] == 0.001,y2[1] == -0.001, y1'[0.001] == 0.001,
y2'[0.001] == 0.001}, {y1, y2}, {x, 30}]


I need to plot the integration of solution(y1) * x^2.

New contributor
Bahi Mido is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
• Try Plot[Evaluate[y1[x] x^2 /. sol], {x, 0.001, 30}] – Cesareo Dec 2 at 13:28
• thank you but i need the integration of the solution of( y1)*x^2 – Bahi Mido Dec 2 at 13:36

## 1 Answer

You can augment your system to

pde1 = -y1''[x] - (2*y1'[x])/x + (10^-19 (y1[x])^2y2[x])*y1[x] == 0;
pde2 = y2''[x] + (2*y2'[x])/x - (10^-25)*(y1[x])^2 == 0;
pde3 = y3'[x] == y1[x] x^2;
sol = NDSolve[{pde1, pde2, pde3, y1[1] == 0.001, y2[1] == -0.001, y1'[0.001] == 0.001, y2'[0.001] == 0.001, y3[0.001] == 0}, {y1, y2,y3}, {x, 30}]


and then

Plot[Evaluate[y3[x] /. sol], {x, 0.001, 30}]

• thank you so much it's so helpful – Bahi Mido Dec 2 at 14:14