Solving a first order differential equation with initial conditions

Click For Summary
SUMMARY

The forum discussion centers on solving the first-order differential equation \( x' = \sin(t) (x+2) \) with the initial condition \( x(0) = 1 \). The user initially derived the solution \( x = c e^{-\cos(t)} - 2 \) and calculated \( c \) incorrectly, leading to confusion with the output from Wolfram Alpha, which provided \( x = 3e^{-\cos(t)+1} - 2 \). After clarification from other users, it was confirmed that the user had neglected to multiply the last term by \( e \), resulting in the discrepancy. The correct solution aligns with Wolfram Alpha's output.

PREREQUISITES
  • Understanding of first-order differential equations
  • Familiarity with initial value problems
  • Knowledge of exponential functions and their properties
  • Experience using computational tools like Wolfram Alpha for verification
NEXT STEPS
  • Study the method of integrating factors for solving first-order ODEs
  • Learn about the existence and uniqueness theorem for initial value problems
  • Explore the use of Laplace transforms in solving differential equations
  • Investigate common pitfalls in solving ODEs and how to avoid them
USEFUL FOR

Students, educators, and professionals in mathematics, engineering, and physics who are working with differential equations and require clarity on solution methods and verification techniques.

arhzz
Messages
284
Reaction score
58
Homework Statement
Solve the equation
Relevant Equations
-
Hello!

Consider this ODE;

$$ x' = sin(t) (x+2) $$ with initial conditions x(0) = 1;

Now I've solved it and according to wolfram alpha it is correct (I got the homogenous and the particular solution)

$$ x = c * e^{-cos(t)} -2 $$ and now I wanted to plug in the initial conditions and this is how i did it;

$$ 1 = c * e^{-cos(0)} -2 $$ now we can rewrite that as ## 1 = \frac{c}{e} -2 ## and now we want c we multiply by e

$$ e = c -2 $$ c should be c = e +2

Now I plug that back into my x

$$ x = e + 2 * e^{-cos(t)} -2 $$ and I get ## x = e * e^{-cos(t)} ##

Now wolfram alpha is giving me a diffrent result; ## x = 3e^{-cos(t)+1} -2 ##

I don't see how they get to this? I am not sure if I am doing something wrong,could it be that wolfram alpha is not really solving the ODE I input?

Thanks!
 
Physics news on Phys.org
arhzz said:
Consider this ODE;
$$ x' = sin(t) (x+2) $$ with initial conditions x(0) = 1
Now I've solved it and according to wolfram alpha it is correct (I got the homogenous and the particular solution)
$$ x = c * e^{-cos(t)} -2 $$ and now I wanted to plug in the initial conditions and this is how i did it;

$$ 1 = c * e^{-cos(0)} -2 $$ now we can rewrite that as ## 1 = \frac{c}{e} -2 ## and now we want c we multiply by e

$$ e = c -2 $$ c should be c = e +2
You forgot to multiply the last term on the right side by e.
arhzz said:
Now I plug that back into my x

$$ x = e + 2 * e^{-cos(t)} -2 $$ and I get ## x = e * e^{-cos(t)} ##

Now wolfram alpha is giving me a diffrent result; ## x = 3e^{-cos(t)+1} -2 ##

I don't see how they get to this? I am not sure if I am doing something wrong,could it be that wolfram alpha is not really solving the ODE I input?

Thanks!
I get the same result as Wolfram.
 
  • Like
Likes   Reactions: bob012345
Mark44 said:
You forgot to multiply the last term on the right side by e.

I get the same result as Wolfram.
Yea I get it too now,my bad.Thanks for pointing the error out.Cheers
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 26 ·
Replies
26
Views
1K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
4
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K