Skip to main content
Commonmark migration
Source Link

I think I have solved this ODE (I didn't verify the solution). The problem with DSolve is Integrate was not terminating for this inhomogeneous equation.

So what I did was solve the homogeneous equation, then applied variation of parameters described here:

homode = -16c*m^2Cos[x]k[x] - c(Sin[3x] - 7Sin[x])k'[x] + 4c*Cos[x]Sin[x]^2k''[x] == 0;

homsol = First[k[x] /. DSolve[homode, k[x], x]];

u1 = homsol /. {C[1] -> 1, C[2] -> 0};
u2 = homsol /. {C[1] -> 0, C[2] -> 1};

f = m^2(3 + 4m Cos[x] + Cos[2x])Tan[x/2]^(2m)Cos[x]Sin[x]^2/(4c*Cos[x] Sin[x]^2);

W = Wronskian[homode, k, x];

A = -HoldForm[Integrate[#, x]]&[u2*f/W];
B = HoldForm[Integrate[#, x]]&[u1*f/W];

TraditionalForm[k[x] == u1 C[1] + u2 C[2] + A u1 + B u2]

enter image description here

#--- Edit ---

--- Edit ---

I have verified this solution is correct and I thought I'd share because this is the first time I've found a real use for Inactive over Hold... exciting!

So instead of using HoldForm to hold A and B, I use Inactivate:

A = Inactivate[-Integrate[u2*f/W, x], Integrate];
B = Inactivate[Integrate[u1*f/W, x], Integrate];

final = u1 C[1] + u2 C[2] + A u1 + B u2;

FullSimplify[testk /. {k[x] -> final, k'[x] -> D[final, x], k''[x] -> D[final, {x, 2}]}]
True

I think I have solved this ODE (I didn't verify the solution). The problem with DSolve is Integrate was not terminating for this inhomogeneous equation.

So what I did was solve the homogeneous equation, then applied variation of parameters described here:

homode = -16c*m^2Cos[x]k[x] - c(Sin[3x] - 7Sin[x])k'[x] + 4c*Cos[x]Sin[x]^2k''[x] == 0;

homsol = First[k[x] /. DSolve[homode, k[x], x]];

u1 = homsol /. {C[1] -> 1, C[2] -> 0};
u2 = homsol /. {C[1] -> 0, C[2] -> 1};

f = m^2(3 + 4m Cos[x] + Cos[2x])Tan[x/2]^(2m)Cos[x]Sin[x]^2/(4c*Cos[x] Sin[x]^2);

W = Wronskian[homode, k, x];

A = -HoldForm[Integrate[#, x]]&[u2*f/W];
B = HoldForm[Integrate[#, x]]&[u1*f/W];

TraditionalForm[k[x] == u1 C[1] + u2 C[2] + A u1 + B u2]

enter image description here

#--- Edit ---

I have verified this solution is correct and I thought I'd share because this is the first time I've found a real use for Inactive over Hold... exciting!

So instead of using HoldForm to hold A and B, I use Inactivate:

A = Inactivate[-Integrate[u2*f/W, x], Integrate];
B = Inactivate[Integrate[u1*f/W, x], Integrate];

final = u1 C[1] + u2 C[2] + A u1 + B u2;

FullSimplify[testk /. {k[x] -> final, k'[x] -> D[final, x], k''[x] -> D[final, {x, 2}]}]
True

I think I have solved this ODE (I didn't verify the solution). The problem with DSolve is Integrate was not terminating for this inhomogeneous equation.

So what I did was solve the homogeneous equation, then applied variation of parameters described here:

homode = -16c*m^2Cos[x]k[x] - c(Sin[3x] - 7Sin[x])k'[x] + 4c*Cos[x]Sin[x]^2k''[x] == 0;

homsol = First[k[x] /. DSolve[homode, k[x], x]];

u1 = homsol /. {C[1] -> 1, C[2] -> 0};
u2 = homsol /. {C[1] -> 0, C[2] -> 1};

f = m^2(3 + 4m Cos[x] + Cos[2x])Tan[x/2]^(2m)Cos[x]Sin[x]^2/(4c*Cos[x] Sin[x]^2);

W = Wronskian[homode, k, x];

A = -HoldForm[Integrate[#, x]]&[u2*f/W];
B = HoldForm[Integrate[#, x]]&[u1*f/W];

TraditionalForm[k[x] == u1 C[1] + u2 C[2] + A u1 + B u2]

enter image description here

--- Edit ---

I have verified this solution is correct and I thought I'd share because this is the first time I've found a real use for Inactive over Hold... exciting!

So instead of using HoldForm to hold A and B, I use Inactivate:

A = Inactivate[-Integrate[u2*f/W, x], Integrate];
B = Inactivate[Integrate[u1*f/W, x], Integrate];

final = u1 C[1] + u2 C[2] + A u1 + B u2;

FullSimplify[testk /. {k[x] -> final, k'[x] -> D[final, x], k''[x] -> D[final, {x, 2}]}]
True
added 6 characters in body
Source Link
Greg Hurst
  • 36.8k
  • 1
  • 94
  • 143

I think I have solved this ODE (I didn't verify the solution). The problem with DSolve is Integrate was not terminating for this inhomogeneous equation.

So what I did was solve the homogeneous equation, then applied variation of parameters described here:

homode = -16c*m^2Cos[x]k[x] - c(Sin[3x] - 7Sin[x])k'[x] + 4c*Cos[x]Sin[x]^2k''[x] == 0;

homsol = First[k[x] /. DSolve[homode, k[x], x]];

u1 = homsol /. {C[1] -> 1, C[2] -> 0};
u2 = homsol /. {C[1] -> 0, C[2] -> 1};

f = m^2(3 + 4m Cos[x] + Cos[2x])Tan[x/2]^(2m)Cos[x]Sin[x]^2/(4c*Cos[x] Sin[x]^2);

W = Wronskian[homode, k, x];

A = -HoldForm[Integrate[#, x]]&[u2*f/W];
B = HoldForm[Integrate[#, x]]&[u1*f/W];

TraditionalForm[k[x] == u1 C[1] + u2 C[2] + A u1 + B u2]

enter image description here

#--- Edit ---

I have verified this solution is correct and I thought I'd share because this is the first time I've found a real use for Inactive over Hold... exciting!

So instead of using HoldForm to hold A and B, I use Inactivate:

A = Inactivate[-Integrate[u2*f/W, x], Integrate];
B = Inactivate[Integrate[u1*f/W, x], Integrate];

final = u1 C[1] + u2 C[2] + A u1 + B u2;

FullSimplify[testk /. {k[x] -> solfinal, k'[x] -> D[solD[final, x], k''[x] -> D[solD[final, {x, 2}]}]
True

I think I have solved this ODE (I didn't verify the solution). The problem with DSolve is Integrate was not terminating for this inhomogeneous equation.

So what I did was solve the homogeneous equation, then applied variation of parameters described here:

homode = -16c*m^2Cos[x]k[x] - c(Sin[3x] - 7Sin[x])k'[x] + 4c*Cos[x]Sin[x]^2k''[x] == 0;

homsol = First[k[x] /. DSolve[homode, k[x], x]];

u1 = homsol /. {C[1] -> 1, C[2] -> 0};
u2 = homsol /. {C[1] -> 0, C[2] -> 1};

f = m^2(3 + 4m Cos[x] + Cos[2x])Tan[x/2]^(2m)Cos[x]Sin[x]^2/(4c*Cos[x] Sin[x]^2);

W = Wronskian[homode, k, x];

A = -HoldForm[Integrate[#, x]]&[u2*f/W];
B = HoldForm[Integrate[#, x]]&[u1*f/W];

TraditionalForm[k[x] == u1 C[1] + u2 C[2] + A u1 + B u2]

enter image description here

#--- Edit ---

I have verified this solution is correct and I thought I'd share because this is the first time I've found a real use for Inactive over Hold... exciting!

So instead of using HoldForm to hold A and B, I use Inactivate:

A = Inactivate[-Integrate[u2*f/W, x], Integrate];
B = Inactivate[Integrate[u1*f/W, x], Integrate];

final = u1 C[1] + u2 C[2] + A u1 + B u2;

FullSimplify[testk /. {k[x] -> sol, k'[x] -> D[sol, x], k''[x] -> D[sol, {x, 2}]}]
True

I think I have solved this ODE (I didn't verify the solution). The problem with DSolve is Integrate was not terminating for this inhomogeneous equation.

So what I did was solve the homogeneous equation, then applied variation of parameters described here:

homode = -16c*m^2Cos[x]k[x] - c(Sin[3x] - 7Sin[x])k'[x] + 4c*Cos[x]Sin[x]^2k''[x] == 0;

homsol = First[k[x] /. DSolve[homode, k[x], x]];

u1 = homsol /. {C[1] -> 1, C[2] -> 0};
u2 = homsol /. {C[1] -> 0, C[2] -> 1};

f = m^2(3 + 4m Cos[x] + Cos[2x])Tan[x/2]^(2m)Cos[x]Sin[x]^2/(4c*Cos[x] Sin[x]^2);

W = Wronskian[homode, k, x];

A = -HoldForm[Integrate[#, x]]&[u2*f/W];
B = HoldForm[Integrate[#, x]]&[u1*f/W];

TraditionalForm[k[x] == u1 C[1] + u2 C[2] + A u1 + B u2]

enter image description here

#--- Edit ---

I have verified this solution is correct and I thought I'd share because this is the first time I've found a real use for Inactive over Hold... exciting!

So instead of using HoldForm to hold A and B, I use Inactivate:

A = Inactivate[-Integrate[u2*f/W, x], Integrate];
B = Inactivate[Integrate[u1*f/W, x], Integrate];

final = u1 C[1] + u2 C[2] + A u1 + B u2;

FullSimplify[testk /. {k[x] -> final, k'[x] -> D[final, x], k''[x] -> D[final, {x, 2}]}]
True
added 514 characters in body
Source Link
Greg Hurst
  • 36.8k
  • 1
  • 94
  • 143

I think I have solved this ODE (I didn't verify the solution). The problem with DSolve is Integrate was not terminating for this inhomogeneous equation.

So what I did was solve the homogeneous equation, then applied variation of parameters described here:

homode = -16c*m^2Cos[x]k[x] - c(Sin[3x] - 7Sin[x])k'[x] + 4c*Cos[x]Sin[x]^2k''[x] == 0;

homsol = First[k[x] /. DSolve[homode, k[x], x]];

u1 = homsol /. {C[1] -> 1, C[2] -> 0};
u2 = homsol /. {C[1] -> 0, C[2] -> 1};

f = m^2(3 + 4m Cos[x] + Cos[2x])Tan[x/2]^(2m)Cos[x]Sin[x]^2/(4c*Cos[x] Sin[x]^2);

W = Wronskian[homode, k, x];

A = -HoldForm[Integrate[#, x]]&[u2*f/W];
B = HoldForm[Integrate[#, x]]&[u1*f/W];

TraditionalForm[k[x] == u1 C[1] + u2 C[2] + A u1 + B u2]

enter image description here

#--- Edit ---

I have verified this solution is correct and I thought I'd share because this is the first time I've found a real use for Inactive over Hold... exciting!

So instead of using HoldForm to hold A and B, I use Inactivate:

A = Inactivate[-Integrate[u2*f/W, x], Integrate];
B = Inactivate[Integrate[u1*f/W, x], Integrate];

final = u1 C[1] + u2 C[2] + A u1 + B u2;

FullSimplify[testk /. {k[x] -> sol, k'[x] -> D[sol, x], k''[x] -> D[sol, {x, 2}]}]
True

I think I have solved this ODE (I didn't verify the solution). The problem with DSolve is Integrate was not terminating for this inhomogeneous equation.

So what I did was solve the homogeneous equation, then applied variation of parameters described here:

homode = -16c*m^2Cos[x]k[x] - c(Sin[3x] - 7Sin[x])k'[x] + 4c*Cos[x]Sin[x]^2k''[x] == 0;

homsol = First[k[x] /. DSolve[homode, k[x], x]];

u1 = homsol /. {C[1] -> 1, C[2] -> 0};
u2 = homsol /. {C[1] -> 0, C[2] -> 1};

f = m^2(3 + 4m Cos[x] + Cos[2x])Tan[x/2]^(2m)Cos[x]Sin[x]^2/(4c*Cos[x] Sin[x]^2);

W = Wronskian[homode, k, x];

A = -HoldForm[Integrate[#, x]]&[u2*f/W];
B = HoldForm[Integrate[#, x]]&[u1*f/W];

TraditionalForm[k[x] == u1 C[1] + u2 C[2] + A u1 + B u2]

enter image description here

I think I have solved this ODE (I didn't verify the solution). The problem with DSolve is Integrate was not terminating for this inhomogeneous equation.

So what I did was solve the homogeneous equation, then applied variation of parameters described here:

homode = -16c*m^2Cos[x]k[x] - c(Sin[3x] - 7Sin[x])k'[x] + 4c*Cos[x]Sin[x]^2k''[x] == 0;

homsol = First[k[x] /. DSolve[homode, k[x], x]];

u1 = homsol /. {C[1] -> 1, C[2] -> 0};
u2 = homsol /. {C[1] -> 0, C[2] -> 1};

f = m^2(3 + 4m Cos[x] + Cos[2x])Tan[x/2]^(2m)Cos[x]Sin[x]^2/(4c*Cos[x] Sin[x]^2);

W = Wronskian[homode, k, x];

A = -HoldForm[Integrate[#, x]]&[u2*f/W];
B = HoldForm[Integrate[#, x]]&[u1*f/W];

TraditionalForm[k[x] == u1 C[1] + u2 C[2] + A u1 + B u2]

enter image description here

#--- Edit ---

I have verified this solution is correct and I thought I'd share because this is the first time I've found a real use for Inactive over Hold... exciting!

So instead of using HoldForm to hold A and B, I use Inactivate:

A = Inactivate[-Integrate[u2*f/W, x], Integrate];
B = Inactivate[Integrate[u1*f/W, x], Integrate];

final = u1 C[1] + u2 C[2] + A u1 + B u2;

FullSimplify[testk /. {k[x] -> sol, k'[x] -> D[sol, x], k''[x] -> D[sol, {x, 2}]}]
True
edited body
Source Link
Greg Hurst
  • 36.8k
  • 1
  • 94
  • 143
Loading
deleted 2 characters in body
Source Link
Greg Hurst
  • 36.8k
  • 1
  • 94
  • 143
Loading
Source Link
Greg Hurst
  • 36.8k
  • 1
  • 94
  • 143
Loading