Is My Solution to the ODE Using Weierstrauss Substitutions Correct?

  • Thread starter AdrianZ
  • Start date
  • Tags
    Ode
In summary, this problem is about finding the y-coordinate of a point that is defined everywhere but for which the tangent at that point is undefined. The student has found a solution by using Weierstrauss substitution and integrating to get an equation in which te^x + xe^x - e^x + C = 0.
  • #1
AdrianZ
319
0

Homework Statement


y' + siny + xcosy + x = 0

The Attempt at a Solution


well, I've used Weierstrauss substitutions: siny = 2t/(1+t^2) , cosy = (1-t^2)/(1+t^2) , dy = 2dt/(1+t^2) where t=tan(x/2).

2/(1+t^2)dt + 2t/(1+t^2)dx + x(1-t^2)/(1+t^2)dx + xdx = 0
2dt + 2tdx + x(1-t^2)dx + x(1+t^2)dx = 0
2dt + (2t + x(1-t^2) + x(1+t^2))dx = 0
2dt + (2t + x - xt^2 + x + xt^2)dx = 0
2dt + (2t + 2x)dx = 0
dt + (t+x)dx = 0

well, if I multiply e^x to both sides, it'll be an exact differential and after integrating I'll have:
te^x + xe^x - e^x + C. after substituting t= tan(x/2) we obtain:
e^x(tan(y/2) + x - 1) + C.

well, this is a problem that our professor gave in the last lecture for extra score in the final exam. so I want to be sure that I've solved it and my method is correct.
Is it correct if I substitute t=tan(x/2)? because the original problem is defined everywhere but after I use Weierstrauss substitutions then I should restrict x to the x's that are defined. (x=pi and -pi are obviously not defined now). Wouldn't that cause problems?
 
Physics news on Phys.org
  • #2
AdrianZ said:

Homework Statement


y' + siny + xcosy + x = 0

The Attempt at a Solution


well, I've used Weierstrauss substitutions: siny = 2t/(1+t^2) , cosy = (1-t^2)/(1+t^2) , dy = 2dt/(1+t^2) where t=tan(x/2).

2/(1+t^2)dt + 2t/(1+t^2)dx + x(1-t^2)/(1+t^2)dx + xdx = 0
2dt + 2tdx + x(1-t^2)dx + x(1+t^2)dx = 0
2dt + (2t + x(1-t^2) + x(1+t^2))dx = 0
2dt + (2t + x - xt^2 + x + xt^2)dx = 0
2dt + (2t + 2x)dx = 0
dt + (t+x)dx = 0

well, if I multiply e^x to both sides, it'll be an exact differential and after integrating I'll have:
te^x + xe^x - e^x + C.
You should have an equation. Is it te^x + xe^x - e^x + C = 0?
AdrianZ said:
after substituting t= tan(x/2) we obtain:
e^x(tan(y/2) + x - 1) + C.

well, this is a problem that our professor gave in the last lecture for extra score in the final exam. so I want to be sure that I've solved it and my method is correct.
Is it correct if I substitute t=tan(x/2)? because the original problem is defined everywhere but after I use Weierstrauss substitutions then I should restrict x to the x's that are defined. (x=pi and -pi are obviously not defined now). Wouldn't that cause problems?
You can check your solution yourself. Differentiate your final equation implicitly, and substitute into your differential equation.
 
  • #3
Mark44 said:
You should have an equation. Is it te^x + xe^x - e^x + C = 0?
Yea. It's te^x + xe^x - e^x + C = 0. (I had written only the answer of the integration).

You can check your solution yourself. Differentiate your final equation implicitly, and substitute into your differential equation.

Of course, but that would be terribly tedious.
 
  • #4
So it's OK for us to do the tedious work of checking, but not you?
 
  • #5
Mark44 said:
So it's OK for us to do the tedious work of checking, but not you?

lol. I'm asking you to check if I've done it correctly. that means I'm asking others to see whether what I've done makes sense to them or not.
 
  • #6
Who are you going to ask for a problem on a test? Checking your solution is a good habit to get into when you're solving differential equations.
 
  • #7
Mark44 said:
Who are you going to ask for a problem on a test? Checking your solution is a good habit to get into when you're solving differential equations.

well, that's a good advice. I checked my solution and it worked. but there is one question remained to be answered. There are points like x=pi where tan(x/2) is not defined. those points certainly need to be taken care of I think. How should I treat those points?
 
  • #8
well, I realized that I'll have to treat the points of the form y=2kπ + π separately (because for such points tan(y/2) is not defined and I'm missing some solutions of the ODE for that reason). if I plug y=2kπ+π into the equation I'll obtain:

y' + sin(2kπ+π) + xcos(2kπ+π) + x = 0
y' + 0 + x(-1) + x = 0 -> y' = 0 which means y = C.

Do I need to find what C is?
 
  • #9
Any ideas?
 

FAQ: Is My Solution to the ODE Using Weierstrauss Substitutions Correct?

How can I tell if my solution to an ODE is correct?

To determine if your solution to an ODE is correct, you can take the derivative of your solution and plug it back into the original differential equation. If the resulting equation is true, then your solution is correct.

Can I use a computer program to check my solution?

Yes, you can use a computer program such as Mathematica or Matlab to check your solution. These programs have built-in functions that can verify the solution to an ODE.

Is there a specific format I should follow when writing my ODE solution?

Most commonly, the solution to an ODE is written in terms of a general solution and a particular solution. The general solution includes all possible solutions to the ODE, while the particular solution is a specific solution that satisfies any additional initial conditions.

What are common mistakes to avoid when solving an ODE?

Some common mistakes when solving an ODE include incorrect application of integration or differentiation rules, forgetting to include a constant of integration, and making algebraic errors. It is important to double-check your work and make sure it aligns with the original differential equation.

What should I do if my solution does not match the given answer?

If your solution does not match the given answer, it is important to retrace your steps and check for any mistakes. You can also try solving the ODE using a different method or using a computer program to verify your solution. If you are still unable to find the error, it may be helpful to seek guidance from a professor or peer.

Back
Top